Centos-kernel-stream-9/kernel/cgroup
Rado Vrbovsky 9731573387 Merge: cgroup: Extend cgroup.stat as a replacement of /proc/cgroups for v2
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5601

JIRA: https://issues.redhat.com/browse/RHEL-36267
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5601

The main purpose of this MR is to extend the functionality of cgroup
v2 cgroup.stat control file to expose the number of cgroup subsystems
(including dying ones) enabled at the current directory tree level.

The following is a sample output of the cgroup.stat file at the cgroup
root.

    nr_descendants 57
    nr_subsys_cpuset 1
    nr_subsys_cpu 42
    nr_subsys_io 42
    nr_subsys_memory 57
    nr_subsys_perf_event 58
    nr_subsys_hugetlb 1
    nr_subsys_pids 57
    nr_subsys_rdma 1
    nr_subsys_misc 1
    nr_dying_descendants 39
    nr_dying_subsys_cpuset 0
    nr_dying_subsys_cpu 0
    nr_dying_subsys_io 0
    nr_dying_subsys_memory 39
    nr_dying_subsys_perf_event 0
    nr_dying_subsys_hugetlb 0
    nr_dying_subsys_pids 0
    nr_dying_subsys_rdma 0
    nr_dying_subsys_misc 0

The /proc/cgroups file is used for listing the total numbers of each
cgroup for cgroup v1. However this file is deprecated for v2 and doesn't
show correctly the number of each cgroup subystems enabled in the default
cgroup hierarchy. This can lead to incorrect preception about excessive
dying cgroups of subsystems like blkio/io other than memory.

The cgroup.stat file at the v2 cgroup root can now be used as a
replacement for /proc/cgroups and should be used instead of /proc/cgroups
for cgroup v2 going forward to show correctly the dying cgroup numbers.

The presence of dying memory cgroups is a known issue and we are still
waiting for a proper solution from upstream. However, RHEL9 does have a
RHEL only patch to free the percpu memory from dying memory cgroups to
greatly reduce the memory consumption impact of the dying memory cgroups.

This MR also includes a cpuset bug fix patch.

Signed-off-by: Waiman Long <longman@redhat.com>

Approved-by: Phil Auld <pauld@redhat.com>
Approved-by: Chris von Recklinghausen <crecklin@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2024-11-25 13:17:36 +00:00
..
Makefile
cgroup-internal.h Revert "Revert "Merge: cgroup: Backport upstream cgroup commits up to v6.8"" 2024-05-18 21:38:20 -04:00
cgroup-v1.c cgroup: Avoid unnecessary looping in cgroup_no_v1() 2024-09-30 09:47:01 -04:00
cgroup.c Merge: cgroup: Extend cgroup.stat as a replacement of /proc/cgroups for v2 2024-11-25 13:17:36 +00:00
cpuset.c cgroup/cpuset: Correct invalid remote parition prs 2024-11-04 09:44:25 -05:00
debug.c
freezer.c cgroup: cleanup comments 2022-10-10 21:28:20 -04:00
legacy_freezer.c cgroup, legacy_freezer: update comment for freezer_css_offline() 2024-09-30 09:47:00 -04:00
misc.c cgroup/misc: Introduce misc.events.local 2024-09-30 09:47:02 -04:00
namespace.c Revert "Revert "Merge: cgroup: Backport upstream cgroup commits up to v6.8"" 2024-05-18 21:38:20 -04:00
pids.c cgroup/pids: Avoid spurious event notification 2024-09-30 09:47:03 -04:00
rdma.c rdmacg: fix kernel-doc warnings in rdmacg 2023-11-08 14:47:35 -05:00
rstat.c Merge: BPF 6.9 rebase 2024-10-30 07:25:08 +00:00