On Tue, Feb 2, 2021 at 12:18 PM Johannes Weiner <hannes@xxxxxxxxxxx> wrote: > > The memcg hotunplug callback erroneously flushes counts on the local > CPU, not the counts of the CPU going away; those counts will be lost. > > Flush the CPU that is actually going away. > > Also simplify the code a bit by using mod_memcg_state() and > count_memcg_events() instead of open-coding the upward flush - this is > comparable to how vmstat.c handles hotunplug flushing. > > Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> I think we need Fixes: a983b5ebee572 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") Reviewed-by: Shakeel Butt <shakeelb@xxxxxxxxxx>