Skip to contentSkip to conversation

CPUSETS: remove SMP dependency

PATCH In review Magnus Damm 4 participants 5 messages Oct 26, 2005 – Oct 27, 2005 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CPUSETS: remove SMP dependency

Remove the SMP dependency from CPUSETS.

---

 include/linux/sched.h |    4 ++++
 init/Kconfig          |    1 -
 2 files changed, 4 insertions(+), 1 deletion(-)
include/linux/sched.h +4 -0
diff -urNp linux-2.6.14-rc5-mm1/include/linux/sched.h linux-2.6.14-rc5-mm1-cpusets_no_smp/include/linux/sched.h
@@ -636,6 +636,10 @@ struct sched_domain {
 
 extern void partition_sched_domains(cpumask_t *partition1,
 				    cpumask_t *partition2);
+#else /* CONFIG_SMP */
+
+static inline void partition_sched_domains(cpumask_t *partition1,
+					   cpumask_t *partition2) {}
 #endif /* CONFIG_SMP */
 
 
init/Kconfig +0 -1
diff -urNp linux-2.6.14-rc5-mm1/init/Kconfig linux-2.6.14-rc5-mm1-cpusets_no_smp/init/Kconfig
@@ -266,7 +266,6 @@ config IKCONFIG_PROC
 
 config CPUSETS
 	bool "Cpuset support"
-	depends on SMP
 	help
 	  This option will let you create and manage CPUSETs which
 	  allow dynamically partitioning a system into sets of CPUs and
#1 lore raw
Quoted 2 lines · Magnus Damm

Remove the SMP dependency from CPUSETS.

Why?

#3 lore raw
In reply to Andrew Morton

Andrew, responding to Magnus:

Quoted 3 lines
Quoted 1 line

Remove the SMP dependency from CPUSETS.

Why?

As described in the posting that Magnus linked to, it seemed to me like the cleaner approach - if there is no need to link two CONFIG options, then don't.

Perhaps someone wants to build a uni-processor (UP) kernel for other reasons, but still have it support running some stuff that depends on cpusets being present.

But my vote on UP issues isn't worth much. This patch is no biggie to me either way.

Signature · 3 lines
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <[email protected]> 1.925.600.0401
#4 lore raw
Quoted 5 lines · Paul Jackson

Andrew, responding to Magnus:

Quoted 3 lines
Quoted 1 line

Remove the SMP dependency from CPUSETS.

Why?

Quoted 7 lines

As described in the posting that Magnus linked to, it seemed to me like the cleaner approach - if there is no need to link two CONFIG options, then don't.

Perhaps someone wants to build a uni-processor (UP) kernel for other reasons, but still have it support running some stuff that depends on cpusets being present.

Exactly, and the current Kconfig assumes that all NUMA systems are configured with SMP. But that does not have to be the case, especially with NUMA_EMU.

Depending on SMP only is wrong IMO because CPUSETS manages both sets of cpus (SMP) and sets of mems (NUMA).

So CPUSETS should either depend on SMP || NUMA or nothing.

/ magnus