Skip to content

RFC cgroup: nmi safe css_rstat_updated

Shakeel Butt bpf cgroups linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3llist: add list_add_iff_not_on_list()include/linux/llist.h lib/llist.c+33 -01 reply
2/3cgroup: support to enable nmi-safe css_rstat_updatedinclude/linux/cgroup-defs.h kernel/cgroup/rstat.c+15 -20 replies
3/3cgroup: make css_rstat_updated nmi safekernel/cgroup/rstat.c+76 -235 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] cgroup: nmi safe css_rstat_updated

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/[email protected]

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(-)
Signature · 1 line
2.47.1