diff options
author | Amul Shah <amul.shah@unisys.com> | 2007-02-13 07:26:19 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-02-13 07:26:19 -0500 |
commit | 076422d2af7e3d8e72c6e70843f6ea377714b082 (patch) | |
tree | 942ec9d2e7f3f74d6694af99a745ee74ef851268 /arch/x86_64/kernel | |
parent | 0812a579c92fefa57506821fa08e90f47cb6dbdd (diff) |
[PATCH] x86-64: Allocate the NUMA hash function nodemap dynamically
Remove the statically allocated memory to NUMA node hash map in favor of a
dynamically allocated memory to node hash map (it is cache aligned).
This patch has the nice side effect in that it allows the hash map to grow
for systems with large amounts of memory (256GB - 1TB), but suffer from
having small PCI space tacked onto the boot node (which is somewhere
between 192MB to 512MB on the ES7000).
Signed-off-by: Amul Shah <amul.shah@unisys.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r-- | arch/x86_64/kernel/e820.c | 7 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 6fe191c58084..9d67955bbc31 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -83,6 +83,13 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) | |||
83 | return 1; | 83 | return 1; |
84 | } | 84 | } |
85 | 85 | ||
86 | #ifdef CONFIG_NUMA | ||
87 | /* NUMA memory to node map */ | ||
88 | if (last >= nodemap_addr && addr < nodemap_addr + nodemap_size) { | ||
89 | *addrp = nodemap_addr + nodemap_size; | ||
90 | return 1; | ||
91 | } | ||
92 | #endif | ||
86 | /* XXX ramdisk image here? */ | 93 | /* XXX ramdisk image here? */ |
87 | return 0; | 94 | return 0; |
88 | } | 95 | } |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 60477244d1a3..f330f8285499 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -444,6 +444,11 @@ void __init setup_arch(char **cmdline_p) | |||
444 | /* reserve ebda region */ | 444 | /* reserve ebda region */ |
445 | if (ebda_addr) | 445 | if (ebda_addr) |
446 | reserve_bootmem_generic(ebda_addr, ebda_size); | 446 | reserve_bootmem_generic(ebda_addr, ebda_size); |
447 | #ifdef CONFIG_NUMA | ||
448 | /* reserve nodemap region */ | ||
449 | if (nodemap_addr) | ||
450 | reserve_bootmem_generic(nodemap_addr, nodemap_size); | ||
451 | #endif | ||
447 | 452 | ||
448 | #ifdef CONFIG_SMP | 453 | #ifdef CONFIG_SMP |
449 | /* | 454 | /* |