Re: [RFC PATCH 00/40] mm: reliable 1GB page allocation
From: Rik van Riel
Date: Fri May 22 2026 - 10:06:22 EST
On Fri, 2026-05-22 at 04:02 -0700, Usama Arif wrote:
> On Wed, 20 May 2026 10:59:06 -0400 Rik van Riel <riel@xxxxxxxxxxx>
>
> Hopefully will get to review all the patches. The above one of
> kernel allocations falling back to small pages is interesting.
>
> - Will it result in a performance impact as kernel allocations
> wont benefit from higher order allocation?
It might! We may well need a better solution
here, like spilling over earlier, but limiting
the number of 1GB blocks we can spill over into
simultaneously (partially used for kernel memory).
> - Will this impact 2M THP allocation efficiency due to more
> fragmentation of kernel memory?
THPs come from movable memory. With more 1GB
page blocks not having kernel allocations in
it, THP allocations should be easier.
>
>
> > - movable allocations are preferentially done from clean 1GB
> > blocks, which have only free and movable memory inside,
> > starting with the fullest of these 1GB blocks
> > - 2MB allocations follow the same strategy
> > - 1GB allocations start with the emptiest clean 1GB block
> > - if a 1GB block is mixed, with some movable pageblocks,
> > some free pageblocks, and some unmovable/reclaimable pageblocks,
> > the system has a free threshold below which only unmovable and
> > reclaimable allocations can be done from that 1GB block
> > - below that threshold, no new movable allocations are allowed
> > in that 1GB block, while new unmovable/reclaimable allocations
> > are still allowed
>
> by allowed, do you mean if movable allocations fail, it will
> result in OOM?
Yes, but by that time the zone free memory should
also be below the low watermark, because there
should only be a few partially occupied tainted
1GB page blocks.
If the zone has 300MB low watermark, and there
are 50MB tied up in those reserved-for-unmovable
memory areas, it should not cause early OOMs.
I don't know if we can end up in a situation
where somehow the reserved-for-unmovable memory
would add up to more than the zone low watermark.
That would be bad, and if it happened we would
have to add some sort of protection against that.
--
All Rights Reversed.