diff options
author | 2014-05-07 21:31:17 -0400 | |
---|---|---|
committer | 2014-05-13 11:26:27 -0400 | |
commit | 5024ae29cd285ce9e736776414da645d3a91828c (patch) | |
tree | 0afef891029af86947869d25b8a3c0e10b6ead69 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | blkcg: use trylock on blkcg_pol_mutex in blkcg_reset_stats() (diff) | |
download | linux-dev-5024ae29cd285ce9e736776414da645d3a91828c.tar.xz linux-dev-5024ae29cd285ce9e736776414da645d3a91828c.zip |
cgroup: introduce task_css_is_root()
Determining the css of a task usually requires RCU read lock as that's
the only thing which keeps the returned css accessible till its
reference is acquired; however, testing whether a task belongs to the
root can be performed without dereferencing the returned css by
comparing the returned pointer against the root one in init_css_set[]
which never changes.
Implement task_css_is_root() which can be invoked in any context.
This will be used by the scheduled cgroup_freezer change.
v2: cgroup no longer supports modular controllers. No need to export
init_css_set. Pointed out by Li.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions