[RFC v2 PATCH 05/17] mm: Routines to determine max anon folio allocation order

Ryan Roberts ryan.roberts at arm.com
Fri Apr 14 09:31:07 PDT 2023


On 14/04/2023 17:18, Matthew Wilcox wrote:
> On Fri, Apr 14, 2023 at 05:06:49PM +0100, Ryan Roberts wrote:
>> The point I'm thinking about is for 4K pages, we need to allocate 64K blocks to
>> use the contig bit. Roughly I guess that means going from average of 2K wastage
>> per anon VMA to 32K. Perhaps you can get away with that for a decent perf uplift.
>>
>> But for 64K pages, we need to allocate 2M blocks to use the contig bit. So that
>> takes average wastage from 32K to 1M. That feels a bit harder to justify.
>> Perhaps here, we should make a decision based on MADV_HUGEPAGE?
>>
>> So perhaps we actually want 2 values: one for if MADV_HUGEPAGE is not set on the
>> VMA, and one if it is? (with 64K pages I'm guessing there are many cases where
>> we won't PMD-map THPs - its 512MB).
> 
> I'm kind of hoping that all this work takes away the benefit from
> CONFIG_PAGE_SIZE_64K, and we can just use 4k pages everywhere.

That sounds great. I'm not sure I share your confidence though ;-)



More information about the linux-arm-kernel mailing list