aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-10-15 17:00:43 -0400
committerTejun Heo <tj@kernel.org>2015-10-15 17:00:43 -0400
commite4b7037c8613da41fb3f7b029414fe25370f53c0 (patch)
treea8716e505f8ef3cfe26f0f887929a169087a57f6 /kernel/cgroup.c
parent035f4f510583193949168c77dc957293df24bd77 (diff)
cgroup: drop cgroup__DEVEL__legacy_files_on_dfl
Now that interfaces for the major three controllers - cpu, memory, io - are shaping up, there's no reason to have an option to force legacy files to show up on the unified hierarchy for testing. Drop it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Li Zefan <lizefan@huawei.com> Cc: Johannes Weiner <hannes@cmpxchg.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 74daeefa2d30..4f4fc538cb1b 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -173,12 +173,6 @@ EXPORT_SYMBOL_GPL(cgrp_dfl_root);
173 */ 173 */
174static bool cgrp_dfl_root_visible; 174static bool cgrp_dfl_root_visible;
175 175
176/*
177 * Set by the boot param of the same name and makes subsystems with NULL
178 * ->dfl_files to use ->legacy_files on the default hierarchy.
179 */
180static bool cgroup_legacy_files_on_dfl;
181
182/* some controllers are not supported in the default hierarchy */ 176/* some controllers are not supported in the default hierarchy */
183static unsigned long cgrp_dfl_root_inhibit_ss_mask; 177static unsigned long cgrp_dfl_root_inhibit_ss_mask;
184 178
@@ -3553,17 +3547,8 @@ int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
3553{ 3547{
3554 struct cftype *cft; 3548 struct cftype *cft;
3555 3549
3556 /* 3550 for (cft = cfts; cft && cft->name[0] != '\0'; cft++)
3557 * If legacy_flies_on_dfl, we want to show the legacy files on the 3551 cft->flags |= __CFTYPE_NOT_ON_DFL;
3558 * dfl hierarchy but iff the target subsystem hasn't been updated
3559 * for the dfl hierarchy yet.
3560 */
3561 if (!cgroup_legacy_files_on_dfl ||
3562 ss->dfl_cftypes != ss->legacy_cftypes) {
3563 for (cft = cfts; cft && cft->name[0] != '\0'; cft++)
3564 cft->flags |= __CFTYPE_NOT_ON_DFL;
3565 }
3566
3567 return cgroup_add_cftypes(ss, cfts); 3552 return cgroup_add_cftypes(ss, cfts);
3568} 3553}
3569 3554
@@ -5287,9 +5272,6 @@ int __init cgroup_init(void)
5287 5272
5288 cgrp_dfl_root.subsys_mask |= 1 << ss->id; 5273 cgrp_dfl_root.subsys_mask |= 1 << ss->id;
5289 5274
5290 if (cgroup_legacy_files_on_dfl && !ss->dfl_cftypes)
5291 ss->dfl_cftypes = ss->legacy_cftypes;
5292
5293 if (!ss->dfl_cftypes) 5275 if (!ss->dfl_cftypes)
5294 cgrp_dfl_root_inhibit_ss_mask |= 1 << ss->id; 5276 cgrp_dfl_root_inhibit_ss_mask |= 1 << ss->id;
5295 5277
@@ -5729,14 +5711,6 @@ static int __init cgroup_disable(char *str)
5729} 5711}
5730__setup("cgroup_disable=", cgroup_disable); 5712__setup("cgroup_disable=", cgroup_disable);
5731 5713
5732static int __init cgroup_set_legacy_files_on_dfl(char *str)
5733{
5734 printk("cgroup: using legacy files on the default hierarchy\n");
5735 cgroup_legacy_files_on_dfl = true;
5736 return 0;
5737}
5738__setup("cgroup__DEVEL__legacy_files_on_dfl", cgroup_set_legacy_files_on_dfl);
5739
5740/** 5714/**
5741 * css_tryget_online_from_dir - get corresponding css from a cgroup dentry 5715 * css_tryget_online_from_dir - get corresponding css from a cgroup dentry
5742 * @dentry: directory dentry of interest 5716 * @dentry: directory dentry of interest