linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] cgroup: nmi safe css_rstat_updated
@ 2025-04-29  6:12 Shakeel Butt
  2025-04-29  6:12 ` [RFC PATCH 1/3] llist: add list_add_iff_not_on_list() Shakeel Butt
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Shakeel Butt @ 2025-04-29  6:12 UTC (permalink / raw)
  To: Tejun Heo, Andrew Morton, Alexei Starovoitov
  Cc: Johannes Weiner, Michal Hocko, Roman Gushchin, Muchun Song,
	Yosry Ahmed, Michal Koutný, Vlastimil Babka,
	Sebastian Andrzej Siewior, JP Kobryn, bpf, linux-mm, cgroups,
	linux-kernel, Meta kernel team

BPF programs can run in nmi context and may trigger memcg charged memory
allocation in such context. Recently linux added support to nmi safe
page allocation along with memcg charging of such allocations. However
the kmalloc/slab support and corresponding memcg charging is still
lacking,

To provide nmi safe support for memcg charging for kmalloc/slab
allocations, we need nmi safe memcg stats and for that we need nmi safe
css_rstat_updated() which adds the given cgroup state whose stats are
updated into the per-cpu per-ss update tree. This series took the aim to
make css_rstat_updated() nmi safe.

This series is based on [1].

[1] http://lore.kernel.org/20250404011050.121777-1-inwardvessel@gmail.com

Shakeel Butt (3):
  llist: add list_add_iff_not_on_list()
  cgroup: support to enable nmi-safe css_rstat_updated
  cgroup: make css_rstat_updated nmi safe

 include/linux/cgroup-defs.h |   4 ++
 include/linux/llist.h       |   3 +
 kernel/cgroup/rstat.c       | 112 ++++++++++++++++++++++++++++--------
 lib/llist.c                 |  30 ++++++++++
 4 files changed, 124 insertions(+), 25 deletions(-)

-- 
2.47.1



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-05-21 23:52 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-29  6:12 [RFC PATCH 0/3] cgroup: nmi safe css_rstat_updated Shakeel Butt
2025-04-29  6:12 ` [RFC PATCH 1/3] llist: add list_add_iff_not_on_list() Shakeel Butt
2025-04-30 12:44   ` [RFC PATCH 1/3] llist: add list_add_iff_not_on_list()g Yosry Ahmed
2025-04-29  6:12 ` [RFC PATCH 2/3] cgroup: support to enable nmi-safe css_rstat_updated Shakeel Butt
2025-04-29  6:12 ` [RFC PATCH 3/3] cgroup: make css_rstat_updated nmi safe Shakeel Butt
2025-04-30 13:14   ` Yosry Ahmed
2025-05-01 22:10     ` Shakeel Butt
2025-05-06  9:41       ` Yosry Ahmed
2025-05-06 19:30         ` Shakeel Butt
2025-05-07  6:52           ` Yosry Ahmed
2025-04-29  6:12 ` [OFFLIST PATCH 1/2] cgroup: use separate rstat trees for each subsystem Shakeel Butt
2025-04-29  6:12   ` [OFFLIST PATCH 2/2] cgroup: use subsystem-specific rstat locks to avoid contention Shakeel Butt
2025-04-29  6:15     ` Shakeel Butt
2025-05-21 22:23       ` Klara Modin
2025-05-21 22:29         ` Tejun Heo
2025-05-21 23:23         ` Shakeel Butt
2025-05-21 23:33           ` Shakeel Butt
2025-05-21 23:47             ` JP Kobryn
2025-05-21 23:50               ` Shakeel Butt
2025-05-21 23:52                 ` JP Kobryn
2025-05-21 23:47             ` Shakeel Butt
2025-04-29  6:15   ` [OFFLIST PATCH 1/2] cgroup: use separate rstat trees for each subsystem Shakeel Butt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).