Re: [PATCH 0/4] memcg: cleanup the memcg stats interfaces

From: Shakeel Butt
Date: Mon Nov 10 2025 - 22:00:41 EST


On Tue, Nov 11, 2025 at 10:48:18AM +0800, Qi Zheng wrote:
> Hi Shakeel,
>
> On 11/11/25 10:39 AM, Shakeel Butt wrote:
> > On Tue, Nov 11, 2025 at 10:23:15AM +0800, Qi Zheng wrote:
> > > Hi,
> > >
> > [...]
> > > >
> > > > Are you or Qi planning a follow-up that converts spin_lock_irq() to
> > > > spin_lock() in places where they disabled IRQs was just to update vmstat?
> > >
> > > Perhaps this change could be implemented together in [PATCH 1/4]?
> > >
> > > Of course, it's also reasonable to make it a separate patch. If we
> > > choose this method, I’m fine with either me or Shakeel doing it.
> > >
> >
> > Let's do it separately as I wanted to keep the memcg related changes
> > self-contained.
>
> OK.
>
> >
> > Qi, can you please take a stab at that?
>
> Sure, I will do it.
>
> >
> > > >
> > > > Qi's zombie memcg series will depends on that work I guess..
> > >
> > > Yes, and there are other places that also need to be converted, such as
> > > __folio_migrate_mapping().
> >
> > I see __mod_zone_page_state() usage in __folio_migrate_mapping() and
> > using the same reasoning we can convert it to use mod_zone_page_state().
> > Where else do you need to do these conversions (other than
> > __folio_migrate_mapping)?
>
> I mean converting these places to use spin_lock() instead of
> spin_lock_irq().

For only stats, right?