Re: [PATCH] mm: memcontrol: update state_local when flushing NMI stats

From: Shakeel Butt

Date: Tue Jul 14 2026 - 15:53:46 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>

Acked-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>