Re: [PATCH 01/11] x86: Modify Kconfig to allow up to 4096 cpus

Previous thread: [PATCH 00/11] x86: cleanup early per cpu variables/accesses v5-folded by Mike Travis on Friday, April 25, 2008 - 8:15 pm. (4 messages)

Next thread: [PATCH 03/11] x86: restore pda nodenumber field by Mike Travis on Friday, April 25, 2008 - 8:15 pm. (1 message)
To: Ingo Molnar <mingo@...>
Cc: Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Friday, April 25, 2008 - 8:15 pm

* Increase the limit of NR_CPUS to 4096 and introduce a boolean
called "MAXSMP" which when set (e.g. "allyesconfig"), will set
NR_CPUS = 4096 and NODES_SHIFT = 9 (512).

* Changed max setting for NODES_SHIFT from 15 to 9 to accurately
reflect the real limit.

For inclusion into sched-devel/latest tree.

Based on:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ sched-devel/latest .../mingo/linux-2.6-sched-devel.git

Signed-off-by: Mike Travis <travis@sgi.com>
---
arch/x86/Kconfig | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)

--- linux-2.6.sched.orig/arch/x86/Kconfig
+++ linux-2.6.sched/arch/x86/Kconfig
@@ -513,20 +513,35 @@ config SWIOTLB
access 32-bits of memory can be used on systems with more than
3 GB of memory. If unsure, say Y.

+config MAXSMP
+ bool "Configure Maximum number of SMP Processors and NUMA Nodes"
+ depends on X86_64 && SMP
+ default n
+ help
+ Configure maximum number of CPUS and NUMA Nodes for this architecture.
+ If unsure, say N.
+
+if MAXSMP
+config NR_CPUS
+ int
+ default "4096"
+endif

+if !MAXSMP
config NR_CPUS
- int "Maximum number of CPUs (2-255)"
- range 2 255
+ int "Maximum number of CPUs (2-4096)"
+ range 2 4096
depends on SMP
default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000
default "8"
help
This allows you to specify the maximum number of CPUs which this
- kernel will support. The maximum supported value is 255 and the
+ kernel will support. The maximum supported value is 4096 and the
minimum value which makes sense is 2.

This is purely to save memory - each supported CPU adds
approximately eight kilobytes to the kernel image.
+endif

config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
@@ -917,13 +932,25 @@ config NUMA_EMU
into virtual nodes when booted with "numa=fake=N", where N is the
number of nodes. This is only usef...

To: Mike Travis <travis@...>
Cc: Ingo Molnar <mingo@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Sunday, April 27, 2008 - 6:39 am

Why is redundant option 'maxsmp' a good idea?
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

To: Pavel Machek <pavel@...>
Cc: Mike Travis <travis@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 9:38 am

because this way randconfig can trigger it and can configure all the
otherwise randconfig-invisible [or just plain unlikely] numerics and
options up to their max.

I found 2-3 "large box" bugs via that way already.

Ingo
--

To: Ingo Molnar <mingo@...>
Cc: Mike Travis <travis@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 9:54 am

Should we improve randconfig to select numeric values when range is
given, too?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--

To: Pavel Machek <pavel@...>
Cc: Ingo Molnar <mingo@...>, Mike Travis <travis@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 1:13 pm

Would not be a bad idea; preferrably with a logarithmic distribution.

-hpa
--

To: Pavel Machek <pavel@...>
Cc: Mike Travis <travis@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 11:52 am

definitely - but often there are constraints on the numeric value that
are not spelled out in the Kconfig language. (alignment, granularity,
etc.)

MAXSMP is still useful, as it would still be rather unlikely for all
numeric values to go to the max at once. The other idea is that with it
'make allyesconfig' really puts all build-time limits up to the max.

Ingo
--

Previous thread: [PATCH 00/11] x86: cleanup early per cpu variables/accesses v5-folded by Mike Travis on Friday, April 25, 2008 - 8:15 pm. (4 messages)

Next thread: [PATCH 03/11] x86: restore pda nodenumber field by Mike Travis on Friday, April 25, 2008 - 8:15 pm. (1 message)