lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <563E02DD-473F-4076-B1F1-1AB110A6B952@nvidia.com>
Date: Tue, 06 May 2025 20:02:26 -0400
From: Zi Yan <ziy@...dia.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Vlastimil Babka <vbabka@...e.cz>, Juan Yescas <jyescas@...gle.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 6 May 2025, at 19:50, Andrew Morton wrote:

> On Tue, 6 May 2025 14:48:19 +0200 Vlastimil Babka <vbabka@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ