From: Gregory Price <gourry@gourry.net>
To: David Hildenbrand <david@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>,
linux-mm@kvack.org, corbet@lwn.net, muchun.song@linux.dev,
osalvador@suse.de, akpm@linux-foundation.org, hannes@cmpxchg.org,
laoar.shao@gmail.com, brauner@kernel.org, mclapinski@google.com,
joel.granados@kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>,
Alexandru Moise <00moses.alexander00@gmail.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
David Rientjes <rientjes@google.com>
Subject: Re: [PATCH] Revert "mm, hugetlb: remove hugepages_treat_as_movable sysctl"
Date: Wed, 8 Oct 2025 12:31:22 -0400 [thread overview]
Message-ID: <aOaR2gXBX_bOpG61@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <83e33641-8c42-4341-8e6e-5c75d00f93b9@redhat.com>
On Wed, Oct 08, 2025 at 05:43:23PM +0200, David Hildenbrand wrote:
> On 08.10.25 17:23, Michal Hocko wrote:
> > On Wed 08-10-25 17:14:26, David Hildenbrand wrote:
> > > On 08.10.25 16:59, Michal Hocko wrote:
> > > > yes, I do agree. This is just muddying the semantic of the zone.
> > > >
> > > > Maybe what we really want is to have a configurable zone rather than a
> > > > very specific consumer of it instead. What do I mean by that? We clearly
> > > > have physically (DMA, DMA32) and usability (NORMAL, MOVABLE) constrained
> > > > zones. So rather than having a MOVABLE zone we can have a single zone
> > > > $FOO_NAME zone with configurable attributes - like allocation
> > > > constrains (kernel, user, movable, etc). Now that we can overlap zones
> > > > this should allow for quite a lot flexibility. Implementation wise this
> > > > would require some tricks as we have 2 zone types for potentially 3
> > > > different major usecases (kernel allocations, userspace reserved ranges
> > > > without movability and movable allocations). I haven't thought this
> > > > through completely and mostly throwing this as an idea (maybe won't
> > > > work). Does that make sense?
> > >
I'd also considered something between NORMAL and MOVABLE, something like
ZONE_NOKERNEL or ZONE_USER. But that seemed excessive.
> > That is why I called it user allocations because those are supposed to
> > be configured for userspace consumation and planned for that use. So you
> > would get pretty much a guarantee that no kernel allocations will fall
> > there.
>
> What could end up on it that would not already end up on ZONE_MOVABLE? I
> guess long-term pinned pages, secretmem, guest_memfd, gigantic pages.
>
> Anything else?
>
> I'm not quite clear yet on the use case, though. If all the user allocations
> end up fragmenting the memory, there is also not a lot of benefit to be had
> from that zone long term.
>
The only real use case i've seen is exactly:
- Don't want random GFP_KERNEL to land there
- Might want it to be pinnable
I think that covers what you've described above.
But adding an entire zone felt a bit heavy handed. Allowing gigantic in
movable seemed less - immediately - offensive.
~Gregory
next prev parent reply other threads:[~2025-10-08 16:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 21:44 Gregory Price
2025-10-07 21:59 ` Andrew Morton
2025-10-07 22:12 ` Gregory Price
2025-10-08 8:58 ` David Hildenbrand
2025-10-08 14:18 ` Gregory Price
2025-10-08 14:44 ` David Hildenbrand
2025-10-08 18:58 ` Gregory Price
2025-10-08 19:01 ` David Hildenbrand
2025-10-08 19:44 ` Gregory Price
2025-10-08 19:52 ` David Hildenbrand
2025-10-08 19:59 ` Gregory Price
2025-10-08 14:59 ` Michal Hocko
2025-10-08 15:14 ` David Hildenbrand
2025-10-08 15:23 ` Michal Hocko
2025-10-08 15:43 ` David Hildenbrand
2025-10-08 16:31 ` Gregory Price [this message]
2025-10-09 6:14 ` Michal Hocko
2025-10-09 15:29 ` Gregory Price
2025-10-09 18:47 ` Michal Hocko
2025-10-09 18:51 ` David Hildenbrand
2025-10-09 21:31 ` Gregory Price
2025-10-10 7:40 ` David Hildenbrand
2025-10-10 18:53 ` Gregory Price
2025-10-08 16:08 ` Frank van der Linden
2025-10-08 16:39 ` Gregory Price
2025-10-08 17:05 ` Gregory Price
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=aOaR2gXBX_bOpG61@gourry-fedora-PF4VCD3F \
--to=gourry@gourry.net \
--cc=00moses.alexander00@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=joel.granados@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mclapinski@google.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.com \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=rientjes@google.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