memcg: completely decouple memcg and obj stocks
authorShakeel Butt <shakeel.butt@linux.dev>
Tue, 6 May 2025 22:55:32 +0000 (15:55 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 13 May 2025 23:28:08 +0000 (16:28 -0700)
commitc80509ef65e4e48b1a5cf9dbb98a3ee8be1accb3
tree7a366b676a6c2d56a2dad9378cdd4ee0b27f2488
parent3523dd7af41363f97044ca80cf835ba6e853b9f7
memcg: completely decouple memcg and obj stocks

Let's completely decouple the memcg and obj per-cpu stocks.  This will
enable us to make memcg per-cpu stocks to used without disabling irqs.
Also it will enable us to make obj stocks nmi safe independently which is
required to make kmalloc/slab safe for allocations from nmi context.

Link: https://lkml.kernel.org/r/20250506225533.2580386-4-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Eric Dumaze <edumazet@google.com>
Cc: Jakub Kacinski <kuba@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memcontrol.c