Re: [PATCH] Revert "mm, hugetlb: remove hugepages_treat_as_movable sysctl"

Gregory Price
2025-10-10T18:53:34Z

On Fri, Oct 10, 2025 at 09:40:29AM +0200, David Hildenbrand wrote:
> >
> > Seems like this is pretty stable tbh. Obviously if you hack off the
> > node0 hugepages migration fails - but I feel like you're signing up for
> > that when you turn the bit on.
>
> Right, just needs to be documented thoroughly IMHO.
>

happy to make any doc adjustments.

Better to move any notes every here though:

https://lore.kernel.org/linux-mm/20251009161515.422292-1-gourry@gourry.net/T/#u

---

Maybe worth finding some time at plumbers to discuss block-level
allocation twiddly bits. Still not quite clear how this would pan
out. Maybe it's as simple as adding GFP flags to blocks and having
something like:

echo NO_KERNEL > sys/bus/node/devices/node0/memory1234/eligibility
echo PINNABLE > sys/bus/node/devices/node0/memory1234/eligibility

folio_to_block(folio)->eligible(gfp)

The issue here is obviously that it's clearly racey, in that a bit
twiddle can change the eligibility mid-allocation.

I'll think a bit more about this.

~Gregory