[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <baeb1200-5293-4fe0-aa76-b1d41875af58@suse.cz>
Date: Tue, 6 May 2025 14:48:19 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Andrew Morton <akpm@...ux-foundation.org>,
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,
"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 5/6/25 09:01, Andrew Morton wrote:
> 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?
AFAIK pageblock_order is compile-time constant. Making this a boot parameter
was proposed in v1 but explained as not useful. That explanation could be
added in the changelog?
Powered by blists - more mailing lists