diff options
author | Tejun Heo <tj@kernel.org> | 2014-04-23 11:13:14 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-04-23 11:13:14 -0400 |
commit | aec3dfcb2e43892180ee053e8c260dcdeccf4392 (patch) | |
tree | 525148ea349802915f4918e7d97ca73ab3386d92 /tools/perf/scripts/python | |
parent | f392e51cd6ae6f6ee5b9b6d611cdc282b4c1711e (diff) |
cgroup: introduce effective cgroup_subsys_state
In the planned default unified hierarchy, controllers may get
dynamically attached to and detached from a cgroup and a cgroup may
not have csses for all the controllers associated with the hierarchy.
When a cgroup doesn't have its own css for a given controller, the css
of the nearest ancestor with the controller enabled will be used,
which is called the effective css. This patch introduces
cgroup_e_css() and for_each_e_css() to access the effective csses and
convert compare_css_sets(), find_existing_css_set() and
cgroup_migrate() to use the effective csses so that they can handle
cgroups with partial csses correctly.
This means that for two css_sets to be considered identical, they
should have both matching csses and cgroups. compare_css_sets()
already compares both, not for correctness but for optimization. As
this now becomes a matter of correctness, update the comments
accordingly.
For all !default hierarchies, cgroup_e_css() always equals
cgroup_css(), so this patch doesn't change behavior.
While at it, fix incorrect locking comment for for_each_css().
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions