linux/init
Shakeel Butt 940b01fc8d memcg: nmi safe memcg stats for specific archs
There are archs which have NMI but does not support this_cpu_* ops safely
in the nmi context but they support safe atomic ops in nmi context.  For
such archs, let's add infra to use atomic ops for the memcg stats which
can be updated in nmi.

At the moment, the memcg stats which get updated in the objcg charging
path are MEMCG_KMEM, NR_SLAB_RECLAIMABLE_B & NR_SLAB_UNRECLAIMABLE_B. 
Rather than adding support for all memcg stats to be nmi safe, let's just
add infra to make these three stats nmi safe which this patch is doing.

Link: https://lkml.kernel.org/r/20250519063142.111219-3-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: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-05-31 22:46:08 -07:00
..
.gitignore kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
.kunitconfig initramfs_test: kunit tests for initramfs unpacking 2025-03-08 12:13:04 +01:00
calibrate.c
do_mounts.c init: replace deprecated strncpy with strscpy_pad 2024-04-30 10:34:29 -07:00
do_mounts.h init: flush async file closing 2024-02-08 18:41:03 +01:00
do_mounts_initrd.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
do_mounts_rd.c
init_task.c signal: Provide ignored_posix_timers list 2024-11-07 02:14:45 +01:00
initramfs.c initramfs: avoid static buffer for error message 2025-03-08 12:13:26 +01:00
initramfs_internal.h init: add initramfs_internal.h 2025-03-04 09:52:36 +01:00
initramfs_test.c initramfs_test: kunit tests for initramfs unpacking 2025-03-08 12:13:04 +01:00
Kconfig memcg: nmi safe memcg stats for specific archs 2025-05-31 22:46:08 -07:00
main.c mm/memcg: move mem_cgroup_init() ahead of cgroup_init() 2025-05-12 23:50:34 -07:00
Makefile initramfs_test: kunit tests for initramfs unpacking 2025-03-08 12:13:04 +01:00
noinitramfs.c
version-timestamp.c init/version-timestamp.c: remove unneeded #include <linux/version.h> 2023-01-09 07:34:38 +09:00
version.c init/version.c: Replace strlcpy with strscpy 2023-09-22 09:50:56 -07:00