From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Zi Yan <ziy@nvidia.com>
Cc: Usama Arif <usamaarif642@gmail.com>,
david@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, hannes@cmpxchg.org, shakeel.butt@linux.dev,
riel@surriel.com, baolin.wang@linux.alibaba.com,
Liam.Howlett@oracle.com, npache@redhat.com, ryan.roberts@arm.com,
dev.jain@arm.com, hughd@google.com, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, kernel-team@meta.com,
Juan Yescas <jyescas@google.com>,
Breno Leitao <leitao@debian.org>
Subject: Re: [RFC] mm: khugepaged: use largest enabled hugepage order for min_free_kbytes
Date: Tue, 10 Jun 2025 15:03:24 +0100 [thread overview]
Message-ID: <dc32ec54-88c5-4171-a2d0-389e3ab428c3@lucifer.local> (raw)
In-Reply-To: <2338896F-7F86-4F5A-A3CC-D14459B8F227@nvidia.com>
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.
>
> 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.
> 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
next prev parent reply other threads:[~2025-06-10 14:03 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 14:37 Usama Arif
2025-06-06 15:01 ` Usama Arif
2025-06-06 15:18 ` Zi Yan
2025-06-06 15:38 ` Usama Arif
2025-06-06 16:10 ` Zi Yan
2025-06-07 8:35 ` Lorenzo Stoakes
2025-06-08 0:04 ` Zi Yan
2025-06-09 11:13 ` Usama Arif
2025-06-09 13:19 ` Zi Yan
2025-06-09 14:11 ` Usama Arif
2025-06-09 14:16 ` Lorenzo Stoakes
2025-06-09 14:37 ` Zi Yan
2025-06-09 14:50 ` Lorenzo Stoakes
2025-06-09 15:20 ` Zi Yan
2025-06-09 19:40 ` Lorenzo Stoakes
2025-06-09 19:49 ` Zi Yan
2025-06-09 20:03 ` Usama Arif
2025-06-09 20:24 ` Zi Yan
2025-06-10 10:41 ` Usama Arif
2025-06-10 14:03 ` Lorenzo Stoakes [this message]
2025-06-10 14:20 ` Zi Yan
2025-06-10 15:16 ` Usama Arif
2025-06-09 15:32 ` Zi Yan
2025-06-06 17:37 ` David Hildenbrand
2025-06-09 11:34 ` Usama Arif
2025-06-09 13:28 ` Zi Yan
2025-06-07 8:18 ` Lorenzo Stoakes
2025-06-07 8:44 ` Lorenzo Stoakes
2025-06-09 12:07 ` Usama Arif
2025-06-09 12:12 ` Usama Arif
2025-06-09 14:58 ` Lorenzo Stoakes
2025-06-09 14:57 ` Lorenzo Stoakes
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=dc32ec54-88c5-4171-a2d0-389e3ab428c3@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=dev.jain@arm.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=jyescas@google.com \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npache@redhat.com \
--cc=riel@surriel.com \
--cc=ryan.roberts@arm.com \
--cc=shakeel.butt@linux.dev \
--cc=usamaarif642@gmail.com \
--cc=ziy@nvidia.com \
/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