diff options
author | Tejun Heo <tj@kernel.org> | 2013-06-13 19:27:42 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-06-13 19:27:42 -0700 |
commit | ea15f8ccdb430af1e8bc9b4e19a230eb4c356777 (patch) | |
tree | e75aa3f5ddac2a7092c0f16361d72f9b25232832 /include/linux/cgroup.h | |
parent | 455050d23e1bfc47ca98e943ad5b2f3a9bbe45fb (diff) |
cgroup: split cgroup destruction into two steps
Split cgroup_destroy_locked() into two steps and put the latter half
into cgroup_offline_fn() which is executed from a work item. The
latter half is responsible for offlining the css's, removing the
cgroup from internal lists, and propagating release notification to
the parent. The separation is to allow using percpu refcnt for css.
Note that this allows for other cgroup operations to happen between
the first and second halves of destruction, including creating a new
cgroup with the same name. As the target cgroup is marked DEAD in the
first half and cgroup internals don't care about the names of cgroups,
this should be fine. A comment explaining this will be added by the
next patch which implements the actual percpu refcnting.
As RCU freeing is guaranteed to happen after the second step of
destruction, we can use the same work item for both. This patch
renames cgroup->free_work to ->destroy_work and uses it for both
purposes. INIT_WORK() is now performed right before queueing the work
item.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 81bfd0268e93..e345d8b90046 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -233,7 +233,7 @@ struct cgroup { /* For RCU-protected deletion */ struct rcu_head rcu_head; - struct work_struct free_work; + struct work_struct destroy_work; /* List of events which userspace want to receive */ struct list_head event_list; |