[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLsiOvvxhJnTzKO6@fedora>
Date: Fri, 5 Sep 2025 10:47:38 -0700
From: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] mm: tag kernel stack pages
On Thu, Sep 04, 2025 at 12:23:31PM +0200, David Hildenbrand wrote:
> On 03.09.25 20:19, Vishal Moola (Oracle) wrote:
> > On Wed, Sep 03, 2025 at 09:49:06AM +0200, David Hildenbrand wrote:
> > > [resending my original mail because it might have landed in the spam folder]
> >
> > Ah, indeed the original mail was found in my spam folder. Thanks for
> > resending.
> >
> > > On 20.08.25 22:20, Vishal Moola (Oracle) wrote:
> > > > Currently, we have no way to distinguish a kernel stack page from an
> > > > unidentified page. Being able to track this information can be
> > > > beneficial for optimizing kernel memory usage (i.e. analyzing
> > > > fragmentation, location etc.). Knowing a page is being used for a kernel
> > > > stack gives us more insight about pages that are certainly immovable and
> > > > important to kernel functionality.
> > >
> > > It's a very niche use case. Anything that's not clearly a folio or a
> > > special movable_ops page is certainly immovable. So we can identify
> > > pretty reliable what's movable and what's not.
> > >
> > > Happy to learn how you would want to use that knowledge to reduce
> > > fragmentation. 🙂
> > >
> > > So this reads a bit hand-wavy.
> >
> > My thoughts align with Matthew's response. If we decide "This doesn't add
> > enough value to merge it upstream" thats fine by me.
> >
> > Otherwise if we think this is useful, I can respin this with your
> > suggestion below.
>
> As raised in my other mail, I assume there is no way to just have any stack
> pages in any kernel config marked appropriately (slab allocation
> discussion)?
>
> If so, I prefer to not add it.
I agree, this shouldn't be tied to specific kernel configs. We can leave this
out of tree.
I didn't know a page could only have one type, and trying to handle that
doesn't help explore what we're interested in right now anyway.
> If there is a way to just make it consistent, then no strong opinion from my
> side. Willy is the page-type guard :)
>
> BTW, I was wondering if page-owner could be useful instead.
Thanks for the suggestion, page-owner looks useful for playing around with
different kernel stack allocation methods :)
> --
> Cheers
>
> David / dhildenb
>
Powered by blists - more mailing lists