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

Matthew Wilcox willy at infradead.org
Fri Apr 14 09:18:26 PDT 2023


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.



More information about the linux-arm-kernel mailing list