]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: enable refcnting for root csses
authorTejun Heo <tj@kernel.org>
Wed, 14 May 2014 13:15:02 +0000 (09:15 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 14 May 2014 13:15:02 +0000 (09:15 -0400)
commit79203fad05a78fb0e0c00fb8df244f72237d43fd
treedb5e953a6b3e1d074e64c3e36e3b7c90fc564770
parent63aed80663c0442668eb7654e795cf42fc17242f
cgroup: enable refcnting for root csses

Currently, css_get(), css_tryget() and css_tryget_online() are noops
for root csses as an optimization; however, we're planning to use css
refcnts to track of cgroup lifetime too and root cgroups also need to
be reference counted.  Since css has been converted to percpu_refcnt,
the overhead of refcnting is miniscule and this optimization isn't too
meaningful anymore.  Furthermore, controllers which optimize the root
cgroup often never even invoke these functions in their hot paths.

This patch enables refcnting for root csses too.  This makes CSS_ROOT
flag unused and removes it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
include/linux/cgroup.h
kernel/cgroup.c