From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Juan Yescas <jyescas@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>,
Kalesh Singh <kaleshsingh@google.com>,
"T.J. Mercier" <tjmercier@google.com>,
Isaac Manjarres <isaacmanjarres@google.com>,
android-mm <android-mm@google.com>,
Linux Memory Management List <linux-mm@kvack.org>,
Matthew Wilcox <willy@infradead.org>,
Vlastimil Babka <vbabka@suse.cz>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
lsf-pc@lists.linux-foundation.org
Subject: Re: [LSF/MM/BPF TOPIC] Discussion: Targeted memory allocation via debugfs
Date: Thu, 9 Apr 2026 10:06:10 +0200 [thread overview]
Message-ID: <aa8e148f-252f-4d81-89db-b1702d9b6888@kernel.org> (raw)
In-Reply-To: <CAJDx_rjk-5pp5Z884bnTBss19Xk0msEayR=GAMG2wWCk+WOZ=A@mail.gmail.com>
>>
>> echo 1 >
>> /sys/kernel/debug/mm/node-1/zone-movable/order-10/migrate-Movable/alloc
>>
>> You are just breaking ZONE_MOVABLE guarantees. Or what am I missing?
>
> I see. How should the ZONE_MOVABLE allocations be handled? Should they
> be excluded?
Well, the same applies to MIGRATE_CMA: if you end up placing unmovable
allocations in these areas, you will break these scenarios.
Your driver would have to support page migration, but that's not
trivial. For example, movable_ops pages currently only support order-0
pages.
>
>>
>>>
>>>
>>> We could use a "nr_pages" variable, but we would also need to set the
>>> node, zone and migrate type.
>>>
>>> It would be cumbersome and error prone to have something like this:
>>>
>>> echo "Node1/zone-Normal/MIGRATE_RECLAIMABLE/8" > /proc/kernel/debug/mm/nr_pages
>>
>> I meant something like:
>>
>> echo 1 >
>> /sys/kernel/debug/mm/node-1/zone-Normal/order-10/migrate-Umovable/nr_pages
>
> Got it, we can do something like that. It makes more sense.
>
>>
>> (not sure if we really want to specify the migratetype)
>>
>
> The migrate type is important because we want to make both MIGRATE_CMA
> and MIGRATE_RECLAIMABLE allocations.
See above regarding MIGRATE_CMA.
But in general, bypassing the page allocator and just allocating random
pages is not really nice, not even for a debug feature.
In particular for the scenarios you mentioned:
- CMA allocation failures due to pinned MIGRATE_MOVABLE pages.
I think some decent user-space reproducers might be a lot more elegant.
I guess for CMA, you'd want a way to allocate some ordinary *user space*
(anonymous) memory and be able to check whether the memory was allocated
on CMA memory, to then fire up a page pinning storm and concurrently
trying to allocate the memory.
So maybe you really want a debug mechanism to migrate a (movable) user
space page into a CMA area?
--
Cheers,
David
prev parent reply other threads:[~2026-04-09 8:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 2:42 [LSF/MM/BPF TOPIC] Discussion: Targeted memory allocation via debugfs Juan Yescas
2026-03-16 15:52 ` David Hildenbrand (Arm)
2026-03-19 0:56 ` Juan Yescas
2026-03-23 9:14 ` David Hildenbrand (Arm)
2026-04-08 0:12 ` Juan Yescas
2026-04-08 7:47 ` David Hildenbrand (Arm)
2026-04-08 21:32 ` Juan Yescas
2026-04-09 8:06 ` David Hildenbrand (Arm) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa8e148f-252f-4d81-89db-b1702d9b6888@kernel.org \
--to=david@kernel.org \
--cc=android-mm@google.com \
--cc=isaacmanjarres@google.com \
--cc=jyescas@google.com \
--cc=kaleshsingh@google.com \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=surenb@google.com \
--cc=tjmercier@google.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox