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

Juan Yescas jyescas at google.com
Mon May 5 11:58:24 PDT 2025


On Fri, May 2, 2025 at 4:37 AM Will Deacon <will at kernel.org> wrote:
>
> On Thu, May 01, 2025 at 07:38:13PM +0100, Matthew Wilcox wrote:
> > On Wed, Apr 30, 2025 at 10:25:11PM -0700, Juan Yescas wrote:
> > > 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?
> > 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.
>
> Yes, I agree. It would be nice if arm64 wasn't the odd duck here. You'd
> think Power and Risc-V would benefit from similar treatement, if nothing
> else.
>
> Will

Thanks for the comments, I sent the v2 version with the changes:

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

Thanks
Juan



More information about the linux-arm-kernel mailing list