Commit a0ab1453 authored by Michal Koutný's avatar Michal Koutný Committed by Tejun Heo
Browse files

cgroup: Print message when /proc/cgroups is read on v2-only system



As a followup to commits 6c292092 ("cgroup: replace
unified-hierarchy.txt with a proper cgroup v2 documentation") and
ab031252 ("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: default avatarMichal Koutný <mkoutny@suse.com>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 77bbb259
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment