aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-11-05 12:16:59 -0500
committerTejun Heo <tj@kernel.org>2012-11-05 12:16:59 -0500
commitb25ed609d0eecf077db607e88ea70bae83b6adb2 (patch)
treeba6d9f2b6d1f0a389acb5a52cd4498c0f5ee6060 /include
parent1a90dd508b0b00e382fd61a46f55dc889ac21b39 (diff)
cgroup: remove CGRP_WAIT_ON_RMDIR, cgroup_exclude_rmdir() and cgroup_release_and_wakeup_rmdir()
CGRP_WAIT_ON_RMDIR is another kludge which was added to make cgroup destruction rollback somewhat working. cgroup_rmdir() used to drain CSS references and CGRP_WAIT_ON_RMDIR and the associated waitqueue and helpers were used to allow the task performing rmdir to wait for the next relevant event. Unfortunately, the wait is visible to controllers too and the mechanism got exposed to memcg by 887032670d ("cgroup avoid permanent sleep at rmdir"). Now that the draining and retries are gone, CGRP_WAIT_ON_RMDIR is unnecessary. Remove it and all the mechanisms supporting it. Note that memcontrol.c changes are essentially revert of 887032670d ("cgroup avoid permanent sleep at rmdir"). Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Michal Hocko <mhocko@suse.cz> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Li Zefan <lizefan@huawei.com> Cc: Balbir Singh <bsingharora@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index a3098046250b..47868a86ba2b 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -145,10 +145,6 @@ enum {
145 /* Control Group requires release notifications to userspace */ 145 /* Control Group requires release notifications to userspace */
146 CGRP_NOTIFY_ON_RELEASE, 146 CGRP_NOTIFY_ON_RELEASE,
147 /* 147 /*
148 * A thread in rmdir() is wating for this cgroup.
149 */
150 CGRP_WAIT_ON_RMDIR,
151 /*
152 * Clone cgroup values when creating a new child cgroup 148 * Clone cgroup values when creating a new child cgroup
153 */ 149 */
154 CGRP_CLONE_CHILDREN, 150 CGRP_CLONE_CHILDREN,
@@ -412,23 +408,6 @@ int cgroup_task_count(const struct cgroup *cgrp);
412int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); 408int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task);
413 409
414/* 410/*
415 * When the subsys has to access css and may add permanent refcnt to css,
416 * it should take care of racy conditions with rmdir(). Following set of
417 * functions, is for stop/restart rmdir if necessary.
418 * Because these will call css_get/put, "css" should be alive css.
419 *
420 * cgroup_exclude_rmdir();
421 * ...do some jobs which may access arbitrary empty cgroup
422 * cgroup_release_and_wakeup_rmdir();
423 *
424 * When someone removes a cgroup while cgroup_exclude_rmdir() holds it,
425 * it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up.
426 */
427
428void cgroup_exclude_rmdir(struct cgroup_subsys_state *css);
429void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css);
430
431/*
432 * Control Group taskset, used to pass around set of tasks to cgroup_subsys 411 * Control Group taskset, used to pass around set of tasks to cgroup_subsys
433 * methods. 412 * methods.
434 */ 413 */