diff options
author | 2015-10-15 16:41:51 -0400 | |
---|---|---|
committer | 2015-10-15 16:41:51 -0400 | |
commit | 91486f61f486662c27ef86dd910f875832e3a5de (patch) | |
tree | 19c2bbe7e0bfd8115147d883b47b4978e090048b /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | cgroup: make css_sets pin the associated cgroups (diff) | |
download | linux-dev-91486f61f486662c27ef86dd910f875832e3a5de.tar.xz linux-dev-91486f61f486662c27ef86dd910f875832e3a5de.zip |
cgroup: make cgroup_destroy_locked() test cgroup_is_populated()
cgroup_destroy_locked() currently tests whether any css_sets are
associated to reject removal if the cgroup contains tasks. This works
because a css_set's refcnt converges with the number of tasks linked
to it and thus there's no css_set linked to a cgroup if it doesn't
have any live tasks.
To help tracking resource usage of zombie tasks, putting the ref of
css_set will be separated from disassociating the task from the
css_set which means that a cgroup may have css_sets linked to it even
when it doesn't have any live tasks.
This patch updates cgroup_destroy_locked() so that it tests
cgroup_is_populated(), which counts the number of populated css_sets,
instead of whether cgrp->cset_links is empty to determine whether the
cgroup is populated or not. This ensures that rmdirs won't be
incorrectly rejected for cgroups which only contain zombie tasks.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions