linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeel.butt@linux.dev>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	 Axel Rasmussen <axelrasmussen@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, hannes@cmpxchg.org, mhocko@kernel.org,
	 roman.gushchin@linux.dev, muchun.song@linux.dev
Subject: Re: [PATCH] Revert "ptdesc: remove references to folios from __pagetable_ctor() and pagetable_dtor()"
Date: Wed, 25 Feb 2026 09:06:38 -0800	[thread overview]
Message-ID: <aZ8r15oUuF-3PN-u@linux.dev> (raw)
In-Reply-To: <6b5e14a9-751d-4a0d-9d53-b45a0ee5a4ed@kernel.org>

+memcg maintainers

On Wed, Feb 25, 2026 at 05:08:28PM +0100, David Hildenbrand (Arm) wrote:
> On 2/25/26 17:03, Matthew Wilcox wrote:
> > On Tue, Feb 24, 2026 at 04:24:34PM -0800, Axel Rasmussen wrote:
> >> This change swapped out mod_node_page_state for lruvec_stat_add_folio.
> >> But, these two APIs are not interchangeable: the lruvec version also
> >> increments memcg stats, in addition to "global" pgdat stats.
> >>
> >> So after this change, the "pagetables" memcg stat in memory.stat always
> >> yields "0", which is a userspace visible regression.
> >>
> >> I tried to look for a refactor where we add a variant of
> >> lruvec_stat_mod_folio which takes a pgdat and a memcg instead of a
> >> folio, to try to adhere to the spirit of the original patch. But at the
> >> end of the day this just means we have to call
> >> folio_memcg(ptdesc_folio(ptdesc)) anyway, which doesn't really
> >> accomplish much.
> > 
> > Thank you!  I hadn't been able to get a straight answer on this before.
> > 
> > You're right that there's no good function to call, but that just means
> > we need to make one.  The principle here is that (eventually) different
> > memdescs don't need to know about each other.  Obviously we're not there
> > yet, but we can start disentangling them by not casting ptdescs back to
> > folios (even though they're created that way).
> > 
> > Here's three patches smooshed together; I have them separately and I'll
> > post them soon.
> 
> Should we just apply + backport the revert for now and re-do it based on
> the revert?

Yes please.


  reply	other threads:[~2026-02-25 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-25  0:24 Axel Rasmussen
2026-02-25 16:03 ` Matthew Wilcox
2026-02-25 16:05   ` Matthew Wilcox
2026-02-25 16:08   ` David Hildenbrand (Arm)
2026-02-25 17:06     ` Shakeel Butt [this message]
2026-02-25 16:04 ` David Hildenbrand (Arm)
2026-02-25 16:06   ` David Hildenbrand (Arm)
2026-02-25 17:18 ` Shakeel Butt
2026-02-25 19:31 ` Johannes Weiner

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=aZ8r15oUuF-3PN-u@linux.dev \
    --to=shakeel.butt@linux.dev \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=rppt@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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