]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cgroup: Print message when /proc/cgroups is read on v2-only system
authorMichal Koutný <mkoutny@suse.com>
Tue, 11 Mar 2025 12:36:21 +0000 (13:36 +0100)
committerTejun Heo <tj@kernel.org>
Tue, 11 Mar 2025 19:22:54 +0000 (09:22 -1000)
commita0ab1453226d862cf30fdccc5a8e753f79c5bc99
tree2544a736dc28fd50299db71867828af70f00ff60
parent77bbb259db53ab5f0c971cf0180c28c897a06b9f
cgroup: Print message when /proc/cgroups is read on v2-only system

As a followup to commits 6c2920926b10e ("cgroup: replace
unified-hierarchy.txt with a proper cgroup v2 documentation") and
ab03125268679 ("cgroup: Show # of subsystem CSSes in cgroup.stat"),
add a runtime message to users who read status of controllers in
/proc/cgroups on v2-only system. The detection is based on a)
no controllers are attached to v1, b) default hierarchy is mounted (the
latter is for setups that never mount v2 but read /proc/cgroups upon
boot when controllers default to v2, so that this code may be backported
to older kernels).

Signed-off-by: Michal Koutný <mkoutny@suse.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup-v1.c
kernel/cgroup/cgroup.c