2005-10-26 07:53:23

by Magnus Damm

[permalink] [raw]
Subject: [PATCH] CPUSETS: remove SMP dependency

Remove the SMP dependency from CPUSETS.

Signed-off-by: Magnus Damm <[email protected]>
---

include/linux/sched.h | 4 ++++
init/Kconfig | 1 -
2 files changed, 4 insertions(+), 1 deletion(-)

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
--- linux-2.6.14-rc5-mm1/include/linux/sched.h 2005-10-24 18:18:17.000000000 +0900
+++ linux-2.6.14-rc5-mm1-cpusets_no_smp/include/linux/sched.h 2005-10-26 16:42:34.000000000 +0900
@@ -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 */


diff -urNp linux-2.6.14-rc5-mm1/init/Kconfig linux-2.6.14-rc5-mm1-cpusets_no_smp/init/Kconfig
--- linux-2.6.14-rc5-mm1/init/Kconfig 2005-10-24 18:18:17.000000000 +0900
+++ linux-2.6.14-rc5-mm1-cpusets_no_smp/init/Kconfig 2005-10-26 16:42:34.000000000 +0900
@@ -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


2005-10-26 08:10:01

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] CPUSETS: remove SMP dependency

Magnus Damm <[email protected]> wrote:
>
> Remove the SMP dependency from CPUSETS.


Why?

2005-10-26 08:19:28

by Magnus Damm

[permalink] [raw]
Subject: Re: [PATCH] CPUSETS: remove SMP dependency

On 10/26/05, Andrew Morton <[email protected]> wrote:
> Magnus Damm <[email protected]> wrote:
> >
> > Remove the SMP dependency from CPUSETS.
>
> Why?

http://www.ussg.iu.edu/hypermail/linux/kernel/0510.0/0279.html

/ magnus

2005-10-26 17:25:44

by Paul Jackson

[permalink] [raw]
Subject: Re: [PATCH] CPUSETS: remove SMP dependency

Andrew, responding to Magnus:
> > 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.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.925.600.0401

2005-10-27 03:25:36

by Magnus Damm

[permalink] [raw]
Subject: Re: [PATCH] CPUSETS: remove SMP dependency

On 10/27/05, Paul Jackson <[email protected]> wrote:
> Andrew, responding to Magnus:
> > > 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.

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