Re: [PATCH] mm: memcontrol: update state_local when flushing NMI stats
From: Johannes Weiner
Date: Mon Jul 13 2026 - 07:41:01 EST
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?