From c80d79d746cc48bd94b0ce4f6d4f3c90cd403aaf Mon Sep 17 00:00:00 2001 From: Yasunori Goto Date: Mon, 10 Apr 2006 22:53:53 -0700 Subject: [PATCH] Configurable NODES_SHIFT Current implementations define NODES_SHIFT in include/asm-xxx/numnodes.h for each arch. Its definition is sometimes configurable. Indeed, ia64 defines 5 NODES_SHIFT values in the current git tree. But it looks a bit messy. SGI-SN2(ia64) system requires 1024 nodes, and the number of nodes already has been changeable by config. Suitable node's number may be changed in the future even if it is other architecture. So, I wrote configurable node's number. This patch set defines just default value for each arch which needs multi nodes except ia64. But, it is easy to change to configurable if necessary. On ia64 the number of nodes can be already configured in generic ia64 and SN2 config. But, NODES_SHIFT is defined for DIG64 and HP'S machine too. So, I changed it so that all platforms can be configured via CONFIG_NODES_SHIFT. It would be simpler. See also: http://marc.theaimsgroup.com/?l=linux-kernel&m=114358010523896&w=2 Signed-off-by: Yasunori Goto Cc: Hirokazu Takata Cc: "Luck, Tony" Cc: Andi Kleen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Ivan Kokshaysky Cc: Richard Henderson Cc: Kyle McMartin Cc: Russell King Cc: Ralf Baechle Cc: Jack Steiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/alpha/Kconfig | 5 +++++ arch/arm/Kconfig | 6 ++++++ arch/i386/Kconfig | 6 ++++++ arch/ia64/Kconfig | 19 ++++++++++--------- arch/m32r/Kconfig | 5 +++++ arch/mips/Kconfig | 5 +++++ arch/parisc/Kconfig | 5 +++++ arch/powerpc/Kconfig | 5 +++++ arch/sh/Kconfig | 5 +++++ arch/x86_64/Kconfig | 5 +++++ 10 files changed, 57 insertions(+), 9 deletions(-) (limited to 'arch') diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 9bef61b3036..8290b69da20 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -549,6 +549,11 @@ config NUMA Access). This option is for configuring high-end multiprocessor server machines. If in doubt, say N. +config NODES_SHIFT + int + default "7" + depends on NEED_MULTIPLE_NODES + # LARGE_VMALLOC is racy, if you *really* need it then fix it first config ALPHA_LARGE_VMALLOC bool diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dc5a9332c91..1dbf6ddb300 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -512,6 +512,12 @@ config ARCH_DISCONTIGMEM_ENABLE or have huge holes in the physical address space for other reasons. See for more. +config NODES_SHIFT + int + default "4" if ARCH_LH7A40X + default "2" + depends on NEED_MULTIPLE_NODES + source "mm/Kconfig" config LEDS diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 57301db056f..18ec9fe6deb 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -522,6 +522,12 @@ config NUMA comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) +config NODES_SHIFT + int + default "4" if X86_NUMAQ + default "3" + depends on NEED_MULTIPLE_NODES + config HAVE_ARCH_BOOTMEM_NODE bool depends on NUMA diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index edffe25a477..9f40eeff0b5 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -260,15 +260,6 @@ config NR_CPUS than 64 will cause the use of a CPU mask array, causing a small performance hit. -config IA64_NR_NODES - int "Maximum number of NODEs (256-1024)" if (IA64_SGI_SN2 || IA64_GENERIC) - range 256 1024 - depends on IA64_SGI_SN2 || IA64_GENERIC - default "256" - help - This option specifies the maximum number of nodes in your SSI system. - If in doubt, use the default. - config HOTPLUG_CPU bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" depends on SMP && EXPERIMENTAL @@ -352,6 +343,16 @@ config NUMA Access). This option is for configuring high-end multiprocessor server systems. If in doubt, say N. +config NODES_SHIFT + int "Max num nodes shift(3-10)" + range 3 10 + default "8" + depends on NEED_MULTIPLE_NODES + help + This option specifies the maximum number of nodes in your SSI system. + MAX_NUMNODES will be 2^(This value). + If in doubt, use the default. + # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. # VIRTUAL_MEM_MAP has been retained for historical reasons. config VIRTUAL_MEM_MAP diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 05c864c6c2d..41fd490af3b 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -285,6 +285,11 @@ config NUMA depends on SMP && BROKEN default n +config NODES_SHIFT + int + default "1" + depends on NEED_MULTIPLE_NODES + # turning this on wastes a bunch of space. # Summit needs it only when NUMA is on config BOOT_IOREMAP diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e15709ce886..7aec60d4042 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1590,6 +1590,11 @@ config ARCH_FLATMEM_ENABLE def_bool y depends on !NUMA +config NODES_SHIFT + int + default "6" + depends on NEED_MULTIPLE_NODES + source "mm/Kconfig" config SMP diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 2fdf21989dc..19f911c5dd5 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -177,6 +177,11 @@ config ARCH_DISCONTIGMEM_DEFAULT def_bool y depends on ARCH_DISCONTIGMEM_ENABLE +config NODES_SHIFT + int + default "3" + depends on NEED_MULTIPLE_NODES + source "kernel/Kconfig.preempt" source "kernel/Kconfig.hz" source "mm/Kconfig" diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2cdc35ce804..167e70e9555 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -649,6 +649,11 @@ config NUMA depends on PPC64 default y if SMP && PPC_PSERIES +config NODES_SHIFT + int + default "4" + depends on NEED_MULTIPLE_NODES + config ARCH_SELECT_MEMORY_MODEL def_bool y depends on PPC64 diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 58583f45947..2bcecf42257 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -527,6 +527,11 @@ config CPU_HAS_SR_RB See for further information on SR.RB and register banking in the kernel in general. +config NODES_SHIFT + int + default "1" + depends on NEED_MULTIPLE_NODES + endmenu menu "Boot options" diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 7df2fe1844b..408d44a5975 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -288,6 +288,11 @@ config K8_NUMA Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA instead, which also takes priority if both are compiled in. +config NODES_SHIFT + int + default "6" + depends on NEED_MULTIPLE_NODES + # Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig. config X86_64_ACPI_NUMA -- cgit v1.2.3