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 by887032670d
("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 of887032670d
("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>
This commit is contained in:
parent
1a90dd508b
commit
b25ed609d0
3 changed files with 1 additions and 95 deletions
|
@ -144,10 +144,6 @@ enum {
|
|||
CGRP_RELEASABLE,
|
||||
/* Control Group requires release notifications to userspace */
|
||||
CGRP_NOTIFY_ON_RELEASE,
|
||||
/*
|
||||
* A thread in rmdir() is wating for this cgroup.
|
||||
*/
|
||||
CGRP_WAIT_ON_RMDIR,
|
||||
/*
|
||||
* Clone cgroup values when creating a new child cgroup
|
||||
*/
|
||||
|
@ -411,23 +407,6 @@ int cgroup_task_count(const struct cgroup *cgrp);
|
|||
/* Return true if cgrp is a descendant of the task's cgroup */
|
||||
int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task);
|
||||
|
||||
/*
|
||||
* When the subsys has to access css and may add permanent refcnt to css,
|
||||
* it should take care of racy conditions with rmdir(). Following set of
|
||||
* functions, is for stop/restart rmdir if necessary.
|
||||
* Because these will call css_get/put, "css" should be alive css.
|
||||
*
|
||||
* cgroup_exclude_rmdir();
|
||||
* ...do some jobs which may access arbitrary empty cgroup
|
||||
* cgroup_release_and_wakeup_rmdir();
|
||||
*
|
||||
* When someone removes a cgroup while cgroup_exclude_rmdir() holds it,
|
||||
* it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up.
|
||||
*/
|
||||
|
||||
void cgroup_exclude_rmdir(struct cgroup_subsys_state *css);
|
||||
void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css);
|
||||
|
||||
/*
|
||||
* Control Group taskset, used to pass around set of tasks to cgroup_subsys
|
||||
* methods.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue