[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346768300-10282-6-git-send-email-glommer@parallels.com>
Date: Tue, 4 Sep 2012 18:18:20 +0400
From: Glauber Costa <glommer@...allels.com>
To: <linux-kernel@...r.kernel.org>
Cc: <cgroups@...r.kernel.org>, <linux-mm@...ck.org>, davej@...hat.com,
ben@...adent.org.uk, a.p.zijlstra@...llo.nl, pjt@...gle.com,
lennart@...ttering.net, kay.sievers@...y.org, tj@...nel.org,
Glauber Costa <glommer@...allels.com>
Subject: [RFC 5/5] sched: add cpusets to comounts list
Although we have not yet identified any place where cpusets could be
improved performance-wise by guaranteeing comounts with the other two
cpu cgroups, it is a sane choice to mount them together.
We can preemptively benefit from it and avoid a growing mess, by
guaranteeing that subsystems that mostly contraint the same kind of
resource will live together. With cgroups is never that simple, and
things crosses boundaries quite often. But I hope this can be seen as a
potential improvement.
Signed-off-by: Glauber Costa <glommer@...allels.com>
CC: Dave Jones <davej@...hat.com>
CC: Ben Hutchings <ben@...adent.org.uk>
CC: Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC: Paul Turner <pjt@...gle.com>
CC: Lennart Poettering <lennart@...ttering.net>
CC: Kay Sievers <kay.sievers@...y.org>
CC: Tejun Heo <tj@...nel.org>
---
kernel/cpuset.c | 4 ++++
kernel/sched/core.c | 8 ++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 8c8bd65..f8e1c49 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1879,6 +1879,10 @@ struct cgroup_subsys cpuset_subsys = {
.post_clone = cpuset_post_clone,
.subsys_id = cpuset_subsys_id,
.base_cftypes = files,
+#ifdef CONFIG_CGROUP_FORCE_COMOUNT_CPU
+ .comounts = 2,
+ .must_comount = { cpu_cgroup_subsys_id, cpuacct_subsys_id, },
+#endif
.early_init = 1,
};
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d654bd1..aeff02c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8301,8 +8301,8 @@ struct cgroup_subsys cpu_cgroup_subsys = {
.subsys_id = cpu_cgroup_subsys_id,
.base_cftypes = cpu_files,
#ifdef CONFIG_CGROUP_FORCE_COMOUNT_CPU
- .comounts = 1,
- .must_comount = { cpuacct_subsys_id, },
+ .comounts = 2,
+ .must_comount = { cpuacct_subsys_id, cpuset_subsys_id, },
.bind = cpu_cgroup_bind,
#endif
.early_init = 1,
@@ -8637,8 +8637,8 @@ struct cgroup_subsys cpuacct_subsys = {
.base_cftypes = files,
.bind = cpuacct_bind,
#ifdef CONFIG_CGROUP_FORCE_COMOUNT_CPU
- .comounts = 1,
- .must_comount = { cpu_cgroup_subsys_id, },
+ .comounts = 2,
+ .must_comount = { cpu_cgroup_subsys_id, cpuset_subsys_id, },
#endif
};
#endif /* CONFIG_CGROUP_CPUACCT */
--
1.7.11.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists