On Tue, Apr 18, 2023 at 03:12:50PM -0400, Johannes Weiner wrote:
pageblock_order can be of various sizes, depending on configuration,
but the default is MAX_ORDER-1.
Note that MAX_ORDER got redefined in -mm tree recently.
Given 4k pages, that comes out to
4M. This is a large chunk for the allocator/reclaim/compaction to try
to keep grouped per migratetype. It's also unnecessary as the majority
of higher order allocations - THP and slab - are smaller than that.
This seems way to x86-specific. Other arches have larger THP sizes. I
believe 16M is common.
Maybe define it as min(MAX_ORDER, PMD_ORDER)?