]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup_pids: don't account for the root cgroup
authorTejun Heo <tj@kernel.org>
Thu, 3 Dec 2015 15:18:21 +0000 (10:18 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 3 Dec 2015 15:18:21 +0000 (10:18 -0500)
commit95547792e9a2f679226b18568c3f4e912ab563b8
tree208946c2b33e3eeaa8e7f7d0eedc0a9c0401b4bd
parent5206feaf35c952acd77da5858e1690be11d509ca
cgroup_pids: don't account for the root cgroup

Because accounting resources for the root cgroup sometimes incurs
measureable overhead for workloads which don't care about cgroup and
often ends up calculating a number which is available elsewhere in a
slightly different form, cgroup is not in the business of providing
system-wide statistics.  The pids controller which was introduced
recently was exposing "pids.current" at the root.  This patch disable
accounting for root cgroup and removes the file from the root
directory.

While this is a userland visible behavior change, pids has been
available only in one version and was badly broken there, so I don't
think this will be noticeable.  If it turns out to be a problem, we
can reinstate it for v1 hierarchies.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Aleksa Sarai <cyphar@cyphar.com>
kernel/cgroup_pids.c