On 7/26/24 04:19, Michal Koutný wrote:
So, is the if (...) ever true? (The file won't exist on v1.)I am not sure what you are asking here. Since cgroup.stat is a cgroup v2+ for_each_css(css, ssid, cgroup) {Is this taken? (Given cgroup.stat is only on the default hierarchy.)
+ if ((BIT(ssid) & cgrp_dfl_inhibit_ss_mask) ||
+ (cgroup_subsys[ssid]->root != &cgrp_dfl_root))
+ continue;
only control file, it won't show subsystems that are bound to cgroup v1.
A mixed cgroup v1/v2 environment is allowed, though not encouraged. We can have some cgroup controllers bound to cgroup v2 and the rests to cgroup v1. It is in this case that cgroup.stat will only show those that are with cgroup v2.
Regards,
Longman