From: Zi Yan <ziy@nvidia.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
Juan Yescas <jyescas@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
tjmercier@google.com, isaacmanjarres@google.com,
surenb@google.com, kaleshsingh@google.com,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
David Hildenbrand <david@redhat.com>,
Mike Rapoport <rppt@kernel.org>, Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH v3] mm: Add CONFIG_PAGE_BLOCK_ORDER to select page block order
Date: Tue, 06 May 2025 20:02:26 -0400 [thread overview]
Message-ID: <563E02DD-473F-4076-B1F1-1AB110A6B952@nvidia.com> (raw)
In-Reply-To: <20250506165013.4d48314b6d52d76148cb51f2@linux-foundation.org>
On 6 May 2025, at 19:50, Andrew Morton wrote:
> On Tue, 6 May 2025 14:48:19 +0200 Vlastimil Babka <vbabka@suse.cz> wrote:
>
>>>> +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.
>
> So it is. Why the heck did we make it lower case?
>
> And pageblock_nr_pages.
Because when CONFIG_HUGETLB_PAGE_SIZE_VARIABLE, pageblock_order
is a variable and set at boot (see set_pageblock_order() in mm_init.c ).
So its type is Kconfig dependent.
--
Best Regards,
Yan, Zi
prev parent reply other threads:[~2025-05-07 0:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 0:22 Juan Yescas
2025-05-06 1:14 ` Andrew Morton
2025-05-06 6:53 ` Anshuman Khandual
2025-05-06 12:59 ` Zi Yan
2025-05-06 16:08 ` Juan Yescas
2025-05-06 7:01 ` Andrew Morton
2025-05-06 12:48 ` Vlastimil Babka
2025-05-06 23:50 ` Andrew Morton
2025-05-07 0:02 ` Zi Yan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563E02DD-473F-4076-B1F1-1AB110A6B952@nvidia.com \
--to=ziy@nvidia.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=isaacmanjarres@google.com \
--cc=jyescas@google.com \
--cc=kaleshsingh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=minchan@kernel.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=tjmercier@google.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox