aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-11-05 12:16:58 -0500
committerTejun Heo <tj@kernel.org>2012-11-05 12:16:58 -0500
commited95779340b50e362245c81b5dec0d11a1debfa8 (patch)
tree875124b1945f62ca741a34d8171189b5c4c3378b /include
parent2ef37d3fe474b218e170010a59066e19427c9847 (diff)
cgroup: kill cgroup_subsys->__DEPRECATED_clear_css_refs
2ef37d3fe4 ("memcg: Simplify mem_cgroup_force_empty_list error handling") removed the last user of __DEPRECATED_clear_css_refs. This patch removes __DEPRECATED_clear_css_refs and mechanisms to support it. * Conditionals dependent on __DEPRECATED_clear_css_refs removed. * cgroup_clear_css_refs() can no longer fail. All that needs to be done are deactivating refcnts, setting CSS_REMOVED and putting the base reference on each css. Remove cgroup_clear_css_refs() and the failure path, and open-code the loops into cgroup_rmdir(). This patch keeps the two for_each_subsys() loops separate while open coding them. They can be merged now but there are scheduled changes which need them to be separate, so keep them separate to reduce the amount of churn. local_irq_save/restore() from cgroup_clear_css_refs() are replaced with local_irq_disable/enable() for simplicity. This is safe as cgroup_rmdir() is always called with IRQ enabled. Note that this IRQ switching is necessary to ensure that css_tryget() isn't called from IRQ context on the same CPU while lower context is between CSS deactivation and setting CSS_REMOVED as css_tryget() would hang forever in such cases waiting for CSS to be re-activated or CSS_REMOVED set. This will go away soon. v2: cgroup_call_pre_destroy() removal dropped per Michal. Commit message updated to explain local_irq_disable/enable() conversion. 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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index c90eaa803440..02e09c0e98ab 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -86,7 +86,6 @@ struct cgroup_subsys_state {
86enum { 86enum {
87 CSS_ROOT, /* This CSS is the root of the subsystem */ 87 CSS_ROOT, /* This CSS is the root of the subsystem */
88 CSS_REMOVED, /* This CSS is dead */ 88 CSS_REMOVED, /* This CSS is dead */
89 CSS_CLEAR_CSS_REFS, /* @ss->__DEPRECATED_clear_css_refs */
90}; 89};
91 90
92/* Caller must verify that the css is not for root cgroup */ 91/* Caller must verify that the css is not for root cgroup */
@@ -485,17 +484,6 @@ struct cgroup_subsys {
485 */ 484 */
486 bool use_id; 485 bool use_id;
487 486
488 /*
489 * If %true, cgroup removal will try to clear css refs by retrying
490 * ss->pre_destroy() until there's no css ref left. This behavior
491 * is strictly for backward compatibility and will be removed as
492 * soon as the current user (memcg) is updated.
493 *
494 * If %false, ss->pre_destroy() can't fail and cgroup removal won't
495 * wait for css refs to drop to zero before proceeding.
496 */
497 bool __DEPRECATED_clear_css_refs;
498
499#define MAX_CGROUP_TYPE_NAMELEN 32 487#define MAX_CGROUP_TYPE_NAMELEN 32
500 const char *name; 488 const char *name;
501 489