[PATCH 11/35] x86: enable MAXSMP

From: Mike Travis
Date: Mon Oct 20 2008 - 13:18:04 EST


Set MAXSMP to enable a configuration with the maximum amount of CPUS and
NODES. Also enables CONFIG_CPUMASK_OFFSTACK which moves cpumask's off
the stack (and in structs) when using cpumask_var_t.

From: Mike Travis <travis@xxxxxxx>
Acked-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
---
arch/x86/Kconfig | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)

--- test-compile.orig/arch/x86/Kconfig
+++ test-compile/arch/x86/Kconfig
@@ -571,12 +571,20 @@ config IOMMU_HELPER

config MAXSMP
bool "Configure Maximum number of SMP Processors and NUMA Nodes"
- depends on X86_64 && SMP && BROKEN
+ depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL
+ select CPUMASK_OFFSTACK
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-512)" if !MAXSMP
range 2 512
@@ -591,6 +599,14 @@ config NR_CPUS

This is purely to save memory - each supported CPU adds
approximately eight kilobytes to the kernel image.
+endif
+
+config CPUMASK_OFFSTACK
+ bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS
+ help
+ Use dynamic allocation for cpumask_var_t, instead of putting
+ them on the stack. This is a bit more expensive, but avoids
+ stack overflow.

config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
@@ -1027,10 +1043,16 @@ config NUMA_EMU
into virtual nodes when booted with "numa=fake=N", where N is the
number of nodes. This is only useful for debugging.

+if MAXSMP
+config NODES_SHIFT
+ int
+ default "9"
+endif
+
+if !MAXSMP
config NODES_SHIFT
- int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
+ int "Maximum NUMA Nodes (as a power of 2)"
range 1 9 if X86_64
- default "9" if MAXSMP
default "6" if X86_64
default "4" if X86_NUMAQ
default "3"
@@ -1038,6 +1060,7 @@ config NODES_SHIFT
help
Specify the maximum number of NUMA Nodes available on the target
system. Increases memory reserved to accomodate various tables.
+endif

config HAVE_ARCH_BOOTMEM_NODE
def_bool y

--
--
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/