Re: [PATCH] mm: memcontrol: update state_local when flushing NMI stats
From: Shakeel Butt
Date: Tue Jul 14 2026 - 15:52:12 EST
On Mon, Jul 13, 2026 at 07:39:01AM -0400, Johannes Weiner wrote:
> On Mon, Jul 13, 2026 at 04:50:53PM +0800, Guopeng Zhang wrote:
> > From: Guopeng Zhang <zhangguopeng@xxxxxxxxxx>
> >
> > flush_nmi_stats() updates state[] for kmem and slab counters but leaves
> > the corresponding state_local[] counters unchanged. Local kmem and
> > slab statistics therefore miss updates collected through the NMI-safe
> > atomic path.
> >
> > Update state_local[] together with state[].
> >
> > Fixes: 940b01fc8dc1 ("memcg: nmi safe memcg stats for specific archs")
> > Signed-off-by: Guopeng Zhang <zhangguopeng@xxxxxxxxxx>
>
> This issue affects memcg1 but also the workingset shrinker.
>
> Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
>
> And we should probably CC: stable # 6.15. Shakeel?
Yes it makes sense.