]> asedeno.scripts.mit.edu Git - linux.git/commit
cgroup: distinguish local and children populated states
authorTejun Heo <tj@kernel.org>
Mon, 17 Jul 2017 01:43:33 +0000 (21:43 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 17 Jul 2017 01:44:42 +0000 (21:44 -0400)
commit788b950c62e06b02278a0fd380e1a0667996ce3c
treeca94c0d11e8d7f0b736d27036dd611f6ea2e75a7
parent88e033e326307831922e34e7de0d694274dcc1c7
cgroup: distinguish local and children populated states

cgrp->populated_cnt counts both local (the cgroup's populated
css_sets) and subtree proper (populated children) so that it's only
zero when the whole subtree, including self, is empty.

This patch splits the counter into two so that local and children
populated states are tracked separately.  It allows finer-grained
tests on the state of the hierarchy which will be used to replace
css_set walking local populated test.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup-defs.h
include/linux/cgroup.h
kernel/cgroup/cgroup.c