Thread (12 messages) 12 messages, 5 authors, 2025-05-05

Re: [PATCH] mm: Add ARCH_FORCE_PAGE_BLOCK_ORDER to select page block order

From: Juan Yescas <hidden>
Date: 2025-05-01 19:27:45
Also in: linux-mm, lkml

On Thu, May 1, 2025 at 11:38 AM Matthew Wilcox [off-list ref] wrote:
On Wed, Apr 30, 2025 at 10:25:11PM -0700, Juan Yescas wrote:
quoted
Problem: On large page size configurations (16KiB, 64KiB), the CMA
alignment requirement (CMA_MIN_ALIGNMENT_BYTES) increases considerably,
and this causes the CMA reservations to be larger than necessary.
This means that system will have less available MIGRATE_UNMOVABLE and
MIGRATE_RECLAIMABLE page blocks since MIGRATE_CMA can't fallback to them.

The CMA_MIN_ALIGNMENT_BYTES increases because it depends on
MAX_PAGE_ORDER which depends on ARCH_FORCE_MAX_ORDER. The value of
ARCH_FORCE_MAX_ORDER increases on 16k and 64k kernels.
Sure, but why would any architecture *NOT* want to set this?
You are right, not all the architectures support large page sizes and don't have
the CMA alignment issues that arm64 with 16k and 64k page sizes have.
This change only affects arm64 architectures.
This seems like you're making each architecture bump into the problem
by itself, when the real problem is that the CMA people never thought
about this and should have come up with better defaults.
This change will only affect arm64 architectures. By default,
ARCH_FORCE_PAGE_BLOCK_ORDER
will have the same value that ARCH_FORCE_MAX_ORDER (This is the current
behaviour). If the kernel is configured with large page sizes for
arm64, the user
can decide to change the pageblock_order or leave the default. It is
an opt-in feature
for arm64.

Thanks
Juan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help