[Patch 4/4] cpusets top mask just online, not all possible

From: Paul Jackson
Date: Sat Sep 11 2004 - 03:37:47 EST


Initialize the top cpuset to only have the online
CPUs and Nodes, rather than all possible. This
seems more natural to the observer.

Signed-off-by: Paul Jackson <pj@xxxxxxx>

Index: 2.6.9-rc1-mm4/kernel/cpuset.c
===================================================================
--- 2.6.9-rc1-mm4.orig/kernel/cpuset.c 2004-09-10 15:27:30.000000000 -0700
+++ 2.6.9-rc1-mm4/kernel/cpuset.c 2004-09-10 15:27:32.000000000 -0700
@@ -1271,7 +1271,9 @@ int __init cpuset_init(void)
struct dentry *root;
int err;

- top_cpuset.mems_allowed = node_possible_map;
+ top_cpuset.cpus_allowed = CPU_MASK_ALL;
+ top_cpuset.mems_allowed = NODE_MASK_ALL;
+
atomic_inc(&cpuset_mems_generation);
top_cpuset.mems_generation = atomic_read(&cpuset_mems_generation);

@@ -1300,12 +1302,13 @@ out:
/**
* cpuset_init_smp - initialize cpus_allowed
*
- * Description: Initialize cpus_allowed after cpu_possible_map is initialized
+ * Description: Finish top cpuset after cpu, node maps are initialized
**/

void __init cpuset_init_smp(void)
{
- top_cpuset.cpus_allowed = cpu_possible_map;
+ top_cpuset.cpus_allowed = cpu_online_map;
+ top_cpuset.mems_allowed = node_online_map;
}

/**

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/