[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc32ec54-88c5-4171-a2d0-389e3ab428c3@lucifer.local>
Date: Tue, 10 Jun 2025 15:03:24 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Zi Yan <ziy@...dia.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 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
Powered by blists - more mailing lists