[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250506000133.ba44539dd517e4f54515751b@linux-foundation.org>
Date: Tue, 6 May 2025 00:01:33 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Juan Yescas <jyescas@...gle.com>
Cc: Zi Yan <ziy@...dia.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, tjmercier@...gle.com,
isaacmanjarres@...gle.com, surenb@...gle.com, kaleshsingh@...gle.com,
Vlastimil Babka <vbabka@...e.cz>, "Liam R. Howlett"
<Liam.Howlett@...cle.com>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
David Hildenbrand <david@...hat.com>, Mike Rapoport <rppt@...nel.org>,
Minchan Kim <minchan@...nel.org>
Subject: Re: [PATCH v3] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block
order
On Mon, 5 May 2025 17:22:58 -0700 Juan Yescas <jyescas@...gle.com> 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.
>
> ...
>
> +config PAGE_BLOCK_ORDER
> + int "Page Block Order"
> + range 1 10 if !ARCH_FORCE_MAX_ORDER
> + default 10 if !ARCH_FORCE_MAX_ORDER
> + range 1 ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER
> + default ARCH_FORCE_MAX_ORDER if ARCH_FORCE_MAX_ORDER
Do we really need to do this arithmetic within Kconfig? Would it be
cleaner to do this at runtime, presumably when calculating
pageblock_order?
Powered by blists - more mailing lists