Skip to content

RFC Helpers for debugging dying cgroups

Yakunin, Dmitry (Nebius) cgroups linux-mm lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3cgroup: list all subsystem states in debugfs filesinclude/linux/cgroup-defs.h kernel/cgroup/cgroup.c mm/memcontrol.c+116 -04 replies
2/3proc/kpagecgroup: report also inode numbers of offline cgroupsfs/proc/page.c include/linux/memcontrol.h mm/memcontrol.c +1 more+27 -60 replies
3/3tools/mm/page-types: add flag for showing inodes of offline cgroupstools/mm/page-types.c+16 -20 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAndrey Ryabinin
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Helpers for debugging dying cgroups

This patch series is mostly based on Konstantin's patches which he had sent years ago [1].

This functionality still seems very useful for debugging the difference between entities in cgroupfs and counters in /proc/cgroups, e.g. searching for files that have page cache which prevents destruction of memcg.

I saw the comments in the original thread but didn't understand the Tejun's comment about usage of filehandle instead of ino. Also I saved the original output format in debugfs with extra counters. We can rework this format in the future but now it seems straightforward for just filtering through cmdline utilities.

[1] https://lore.kernel.org/lkml/153414348591.737150.14229960913953276515.stgit@buzz/

Dmitry Yakunin (3):
cgroup: list all subsystem states in debugfs files proc/kpagecgroup: report also inode numbers of offline cgroups tools/mm/page-types: add flag for showing inodes of offline cgroups

 fs/proc/page.c              |  24 ++++++++-
 include/linux/cgroup-defs.h |   1 +
 include/linux/memcontrol.h  |   2 +-
 kernel/cgroup/cgroup.c      | 101 ++++++++++++++++++++++++++++++++++++
 mm/memcontrol.c             |  19 ++++++-
 mm/memory-failure.c         |   2 +-
 tools/mm/page-types.c       |  18 ++++++-
 7 files changed, 159 insertions(+), 8 deletions(-)
Signature · 1 line
2.25.1