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> |
||
---|---|---|
.. | ||
Makefile | ||
cgroup-internal.h | ||
cgroup-v1.c | ||
cgroup.c | ||
cpuset.c | ||
debug.c | ||
freezer.c | ||
legacy_freezer.c | ||
misc.c | ||
namespace.c | ||
pids.c | ||
rdma.c | ||
rstat.c |