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] [thread-next>] [day] [month] [year] [list]
Message-ID: <46F6B7C4-542C-4310-9C70-F7469B151C7C@nvidia.com>
Date: Tue, 10 Jun 2025 10:20:25 -0400
From: Zi Yan <ziy@...dia.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Usama Arif <usamaarif642@...il.com>, david@...hat.com,
 Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
 hannes@...xchg.org, shakeel.butt@...ux.dev, riel@...riel.com,
 baolin.wang@...ux.alibaba.com, Liam.Howlett@...cle.com, npache@...hat.com,
 ryan.roberts@....com, dev.jain@....com, hughd@...gle.com,
 linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
 kernel-team@...a.com, Juan Yescas <jyescas@...gle.com>,
 Breno Leitao <leitao@...ian.org>
Subject: Re: [RFC] mm: khugepaged: use largest enabled hugepage order for
 min_free_kbytes

On 10 Jun 2025, at 10:03, Lorenzo Stoakes wrote:

> On Mon, Jun 09, 2025 at 03:49:52PM -0400, Zi Yan wrote:
> [snip]
>>> I really think a hard cap, expressed in KB/MB, on pageblock size is the way to
>>> go (but overrideable for people crazy enough to truly want 512 MB pages - and
>>> who cannot then complain about watermarks).
>>
>> I agree. Basically, I am thinking:
>> 1) use something like 2MB as default pageblock size for all arch (the value can
>> be set differently if some arch wants a different pageblock size due to other reasons), this can be done by modifying PAGE_BLOCK_MAX_ORDER’s default
>> value;
>
> I don't think we can set this using CONFIG_PAGE_BLOCK_MAX_ORDER.
>
> Because the 'order' will be a different size depending on page size obviously.
>
> So I'm not sure how this would achieve what we want?
>
> It seems to me we should have CONFIG_PAGE_BLOCK_MAX_SIZE_MB or something like
> this, and we take min(page_size << CONFIG_PAGE_BLOCK_MAX_ORDER,
> CONFIG_PAGE_BLOCK_MAX_SIZE_MB << 20) as the size.

OK. Now I get what you mean. Yeah, using MB is clearer as user does not
need to know page size to set the right pageblock size.

>
>>
>> 2) make pageblock_order a boot time parameter, so that user who wants
>> 512MB pages can still get it by changing pageblock order at boot time.
>>
>
> Again, I don't think order is the right choice here, though having it boot time
> configurable (perhaps overriding the default config there) seems sensible.

Understood. The new pageblock size should be set using MB.

>
>> WDYT?
>
>>
>>>
>>>>
>>>> Often, user just ask for an impossible combination: they
>>>> want to use all free memory, because they paid for it, and they
>>>> want THPs, because they want max performance. When PMD THP is
>>>> small like 2MB, the “unusable” free memory is not that noticeable,
>>>> but when PMD THP is as large as 512MB, user just cannot unsee it. :)
>>>
>>> Well, users asking for crazy things then being surprised when they get them
>>> is nothing new :P
>>>
>>>>
>>>>
>>>> Best Regards,
>>>> Yan, Zi
>>>
>>> Thanks for your input!
>>>
>>> Cheers, Lorenzo
>>
>>
>> Best Regards,
>> Yan, Zi


Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ