Re: [ckrm-tech] [PATCH 2/6] Cpusets hooked into containers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[email protected] wrote:
> This patch removes the process grouping code from the cpusets code,
> instead hooking it into the generic container system. This temporarily
> adds cpuset-specific code in kernel/container.c, which is removed by
> the next patch in the series.
> 
> Signed-off-by: Paul Menage <[email protected]>

I needed the following patches to get the cpuset code to compile.
Inlining two patches makes it hard to distinguish between the patches
and harder to read them, so I am attaching them along with this email.

-- 
	Regards,
	Balbir Singh,
	Linux Technology Center,
	IBM Software Labs

Signed-off-by: Balbir Singh <[email protected]>
---

 kernel/cpuset.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN kernel/cpuset.c~fix-cpuset-guarantee-online-cpus-mems-in-subtree kernel/cpuset.c
--- linux-2.6.19-rc2/kernel/cpuset.c~fix-cpuset-guarantee-online-cpus-mems-in-subtree	2006-11-06 11:41:25.000000000 +0530
+++ linux-2.6.19-rc2-balbir/kernel/cpuset.c	2006-11-06 11:43:12.000000000 +0530
@@ -1280,10 +1280,12 @@ int __init cpuset_init(void)
 
 static void guarantee_online_cpus_mems_in_subtree(const struct cpuset *cur)
 {
+	struct container *cont;
 	struct cpuset *c;
 
 	/* Each of our child cpusets mems must be online */
-	list_for_each_entry(c, &cur->children, sibling) {
+	list_for_each_entry(cont, &cur->container->children, sibling) {
+		c = container_cs(cont);
 		guarantee_online_cpus_mems_in_subtree(c);
 		if (!cpus_empty(c->cpus_allowed))
 			guarantee_online_cpus(c, &c->cpus_allowed);
_

Signed-off-by: Balbir Singh <[email protected]>
---

 fs/proc/base.c |    7 -------
 1 file changed, 7 deletions(-)

diff -puN fs/proc/base.c~fix-cpuset-proc-operations fs/proc/base.c
--- linux-2.6.19-rc2/fs/proc/base.c~fix-cpuset-proc-operations	2006-11-06 11:47:35.000000000 +0530
+++ linux-2.6.19-rc2-balbir/fs/proc/base.c	2006-11-06 11:48:27.000000000 +0530
@@ -68,7 +68,6 @@
 #include <linux/security.h>
 #include <linux/ptrace.h>
 #include <linux/seccomp.h>
-#include <linux/cpuset.h>
 #include <linux/container.h>
 #include <linux/audit.h>
 #include <linux/poll.h>
@@ -1788,9 +1787,6 @@ static struct pid_entry tgid_base_stuff[
 #ifdef CONFIG_CONTAINERS
 	REG("container",  S_IRUGO, container),
 #endif
-#ifdef CONFIG_CPUSETS
-	REG("cpuset",     S_IRUGO, cpuset),
-#endif
 	INF("oom_score",  S_IRUGO, oom_score),
 	REG("oom_adj",    S_IRUGO|S_IWUSR, oom_adjust),
 #ifdef CONFIG_AUDITSYSCALL
@@ -2065,9 +2061,6 @@ static struct pid_entry tid_base_stuff[]
 #ifdef CONFIG_CONTAINERS
 	REG("container",  S_IRUGO, container),
 #endif
-#ifdef CONFIG_CPUSETS
-	REG("cpuset",    S_IRUGO, cpuset),
-#endif
 	INF("oom_score", S_IRUGO, oom_score),
 	REG("oom_adj",   S_IRUGO|S_IWUSR, oom_adjust),
 #ifdef CONFIG_AUDITSYSCALL
_

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux