Re: [PATCH 0/4] memcg: cleanup the memcg stats interfaces
From: Roman Gushchin
Date: Tue Nov 11 2025 - 14:02:05 EST
Shakeel Butt <shakeel.butt@xxxxxxxxx> writes:
> The memcg stats are safe against irq (and nmi) context and thus does not
> require disabling irqs. However for some stats which are also maintained
> at node level, it is using irq unsafe interface and thus requiring the
> users to still disables irqs or use interfaces which explicitly disables
> irqs. Let's move memcg code to use irq safe node level stats function
> which is already optimized for architectures with HAVE_CMPXCHG_LOCAL
> (all major ones), so there will not be any performance penalty for its
> usage.
Do you have any production data for this or it's theory-based?
In general I feel we need a benchmark focused on memcg stats:
there was a number of performance improvements and regressions in this
code over last years, so a dedicated benchmark can help with measuring
them.
Nice cleanup btw, thanks!