memcg: no irq disable for memcg stock lock
authorShakeel Butt <shakeel.butt@linux.dev>
Tue, 6 May 2025 22:55:33 +0000 (15:55 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 13 May 2025 23:28:08 +0000 (16:28 -0700)
commit9e619cd4fefd19cdce16e169d5827bc64ae01aa1
treea36894c66461784f2f1f0c1a081331487d99450c
parentc80509ef65e4e48b1a5cf9dbb98a3ee8be1accb3
memcg: no irq disable for memcg stock lock

There is no need to disable irqs to use memcg per-cpu stock, so let's just
not do that.  One consequence of this change is if the kernel while in
task context has the memcg stock lock and that cpu got interrupted.  The
memcg charges on that cpu in the irq context will take the slow path of
memcg charging.  However that should be super rare and should be fine in
general.

Link: https://lkml.kernel.org/r/20250506225533.2580386-5-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