diff options
author | Yasunori Goto <y-goto@jp.fujitsu.com> | 2006-04-11 01:53:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:39 -0400 |
commit | c80d79d746cc48bd94b0ce4f6d4f3c90cd403aaf (patch) | |
tree | 5aa8d1590d95f8fd820ad797fe03a063b592e9bf /arch | |
parent | 653edba1a8b2ed018bdfb078131324dfbfe1dd6a (diff) |
[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 <y-goto@jp.fujitsu.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/Kconfig | 6 | ||||
-rw-r--r-- | arch/i386/Kconfig | 6 | ||||
-rw-r--r-- | arch/ia64/Kconfig | 19 | ||||
-rw-r--r-- | arch/m32r/Kconfig | 5 | ||||
-rw-r--r-- | arch/mips/Kconfig | 5 | ||||
-rw-r--r-- | arch/parisc/Kconfig | 5 | ||||
-rw-r--r-- | arch/powerpc/Kconfig | 5 | ||||
-rw-r--r-- | arch/sh/Kconfig | 5 | ||||
-rw-r--r-- | arch/x86_64/Kconfig | 5 |
10 files changed, 57 insertions, 9 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 9bef61b30367..8290b69da202 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -549,6 +549,11 @@ config NUMA | |||
549 | Access). This option is for configuring high-end multiprocessor | 549 | Access). This option is for configuring high-end multiprocessor |
550 | server machines. If in doubt, say N. | 550 | server machines. If in doubt, say N. |
551 | 551 | ||
552 | config NODES_SHIFT | ||
553 | int | ||
554 | default "7" | ||
555 | depends on NEED_MULTIPLE_NODES | ||
556 | |||
552 | # LARGE_VMALLOC is racy, if you *really* need it then fix it first | 557 | # LARGE_VMALLOC is racy, if you *really* need it then fix it first |
553 | config ALPHA_LARGE_VMALLOC | 558 | config ALPHA_LARGE_VMALLOC |
554 | bool | 559 | bool |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dc5a9332c915..1dbf6ddb300d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -512,6 +512,12 @@ config ARCH_DISCONTIGMEM_ENABLE | |||
512 | or have huge holes in the physical address space for other reasons. | 512 | or have huge holes in the physical address space for other reasons. |
513 | See <file:Documentation/vm/numa> for more. | 513 | See <file:Documentation/vm/numa> for more. |
514 | 514 | ||
515 | config NODES_SHIFT | ||
516 | int | ||
517 | default "4" if ARCH_LH7A40X | ||
518 | default "2" | ||
519 | depends on NEED_MULTIPLE_NODES | ||
520 | |||
515 | source "mm/Kconfig" | 521 | source "mm/Kconfig" |
516 | 522 | ||
517 | config LEDS | 523 | config LEDS |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 57301db056f5..18ec9fe6deb6 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -522,6 +522,12 @@ config NUMA | |||
522 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" | 522 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" |
523 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) | 523 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) |
524 | 524 | ||
525 | config NODES_SHIFT | ||
526 | int | ||
527 | default "4" if X86_NUMAQ | ||
528 | default "3" | ||
529 | depends on NEED_MULTIPLE_NODES | ||
530 | |||
525 | config HAVE_ARCH_BOOTMEM_NODE | 531 | config HAVE_ARCH_BOOTMEM_NODE |
526 | bool | 532 | bool |
527 | depends on NUMA | 533 | depends on NUMA |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index edffe25a477a..9f40eeff0b5c 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -260,15 +260,6 @@ config NR_CPUS | |||
260 | than 64 will cause the use of a CPU mask array, causing a small | 260 | than 64 will cause the use of a CPU mask array, causing a small |
261 | performance hit. | 261 | performance hit. |
262 | 262 | ||
263 | config IA64_NR_NODES | ||
264 | int "Maximum number of NODEs (256-1024)" if (IA64_SGI_SN2 || IA64_GENERIC) | ||
265 | range 256 1024 | ||
266 | depends on IA64_SGI_SN2 || IA64_GENERIC | ||
267 | default "256" | ||
268 | help | ||
269 | This option specifies the maximum number of nodes in your SSI system. | ||
270 | If in doubt, use the default. | ||
271 | |||
272 | config HOTPLUG_CPU | 263 | config HOTPLUG_CPU |
273 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 264 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" |
274 | depends on SMP && EXPERIMENTAL | 265 | depends on SMP && EXPERIMENTAL |
@@ -352,6 +343,16 @@ config NUMA | |||
352 | Access). This option is for configuring high-end multiprocessor | 343 | Access). This option is for configuring high-end multiprocessor |
353 | server systems. If in doubt, say N. | 344 | server systems. If in doubt, say N. |
354 | 345 | ||
346 | config NODES_SHIFT | ||
347 | int "Max num nodes shift(3-10)" | ||
348 | range 3 10 | ||
349 | default "8" | ||
350 | depends on NEED_MULTIPLE_NODES | ||
351 | help | ||
352 | This option specifies the maximum number of nodes in your SSI system. | ||
353 | MAX_NUMNODES will be 2^(This value). | ||
354 | If in doubt, use the default. | ||
355 | |||
355 | # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. | 356 | # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. |
356 | # VIRTUAL_MEM_MAP has been retained for historical reasons. | 357 | # VIRTUAL_MEM_MAP has been retained for historical reasons. |
357 | config VIRTUAL_MEM_MAP | 358 | config VIRTUAL_MEM_MAP |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 05c864c6c2d9..41fd490af3b4 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -285,6 +285,11 @@ config NUMA | |||
285 | depends on SMP && BROKEN | 285 | depends on SMP && BROKEN |
286 | default n | 286 | default n |
287 | 287 | ||
288 | config NODES_SHIFT | ||
289 | int | ||
290 | default "1" | ||
291 | depends on NEED_MULTIPLE_NODES | ||
292 | |||
288 | # turning this on wastes a bunch of space. | 293 | # turning this on wastes a bunch of space. |
289 | # Summit needs it only when NUMA is on | 294 | # Summit needs it only when NUMA is on |
290 | config BOOT_IOREMAP | 295 | config BOOT_IOREMAP |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e15709ce8866..7aec60d40420 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1590,6 +1590,11 @@ config ARCH_FLATMEM_ENABLE | |||
1590 | def_bool y | 1590 | def_bool y |
1591 | depends on !NUMA | 1591 | depends on !NUMA |
1592 | 1592 | ||
1593 | config NODES_SHIFT | ||
1594 | int | ||
1595 | default "6" | ||
1596 | depends on NEED_MULTIPLE_NODES | ||
1597 | |||
1593 | source "mm/Kconfig" | 1598 | source "mm/Kconfig" |
1594 | 1599 | ||
1595 | config SMP | 1600 | config SMP |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 2fdf21989dc2..19f911c5dd58 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -177,6 +177,11 @@ config ARCH_DISCONTIGMEM_DEFAULT | |||
177 | def_bool y | 177 | def_bool y |
178 | depends on ARCH_DISCONTIGMEM_ENABLE | 178 | depends on ARCH_DISCONTIGMEM_ENABLE |
179 | 179 | ||
180 | config NODES_SHIFT | ||
181 | int | ||
182 | default "3" | ||
183 | depends on NEED_MULTIPLE_NODES | ||
184 | |||
180 | source "kernel/Kconfig.preempt" | 185 | source "kernel/Kconfig.preempt" |
181 | source "kernel/Kconfig.hz" | 186 | source "kernel/Kconfig.hz" |
182 | source "mm/Kconfig" | 187 | source "mm/Kconfig" |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2cdc35ce8045..167e70e95556 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -649,6 +649,11 @@ config NUMA | |||
649 | depends on PPC64 | 649 | depends on PPC64 |
650 | default y if SMP && PPC_PSERIES | 650 | default y if SMP && PPC_PSERIES |
651 | 651 | ||
652 | config NODES_SHIFT | ||
653 | int | ||
654 | default "4" | ||
655 | depends on NEED_MULTIPLE_NODES | ||
656 | |||
652 | config ARCH_SELECT_MEMORY_MODEL | 657 | config ARCH_SELECT_MEMORY_MODEL |
653 | def_bool y | 658 | def_bool y |
654 | depends on PPC64 | 659 | depends on PPC64 |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 58583f459471..2bcecf422573 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -527,6 +527,11 @@ config CPU_HAS_SR_RB | |||
527 | See <file:Documentation/sh/register-banks.txt> for further | 527 | See <file:Documentation/sh/register-banks.txt> for further |
528 | information on SR.RB and register banking in the kernel in general. | 528 | information on SR.RB and register banking in the kernel in general. |
529 | 529 | ||
530 | config NODES_SHIFT | ||
531 | int | ||
532 | default "1" | ||
533 | depends on NEED_MULTIPLE_NODES | ||
534 | |||
530 | endmenu | 535 | endmenu |
531 | 536 | ||
532 | menu "Boot options" | 537 | menu "Boot options" |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 7df2fe1844be..408d44a59756 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -288,6 +288,11 @@ config K8_NUMA | |||
288 | Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA | 288 | Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA |
289 | instead, which also takes priority if both are compiled in. | 289 | instead, which also takes priority if both are compiled in. |
290 | 290 | ||
291 | config NODES_SHIFT | ||
292 | int | ||
293 | default "6" | ||
294 | depends on NEED_MULTIPLE_NODES | ||
295 | |||
291 | # Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig. | 296 | # Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig. |
292 | 297 | ||
293 | config X86_64_ACPI_NUMA | 298 | config X86_64_ACPI_NUMA |