diff options
author | Rohit Seth <rohitseth@google.com> | 2007-02-13 07:26:22 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-02-13 07:26:22 -0500 |
commit | 53fee04f318222a3179ca5933d8bda82c1eef17a (patch) | |
tree | 989d1c95b07d22473e596561216637711b4cd819 /include | |
parent | 3b3d5e1db66cd66148b2cebd2c38aff2a8df03d6 (diff) |
[PATCH] x86-64: Fix fake numa for x86_64 machines with big IO hole
This patch resolves the issue of running with numa=fake=X on kernel command
line on x86_64 machines that have big IO hole. While calculating the size
of each node now we look at the total hole size in that range.
Previously there were nodes that only had IO holes in them causing kernel
boot problems. We now use the NODE_MIN_SIZE (64MB) as the minimum size of
memory that any node must have. We reduce the number of allocated nodes if
the number of nodes specified on kernel command line results in any node
getting memory smaller than NODE_MIN_SIZE.
This change allows the extra memory to be incremented in NODE_MIN_SIZE
granule and uniformly distribute among as many nodes (called big nodes) as
possible.
[akpm@osdl.org: build fix]
Signed-off-by: David Rientjes <reintjes@google.com>
Signed-off-by: Paul Menage <menage@google.com>
Signed-off-by: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86_64/e820.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/mmzone.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h index 855fb4a454b6..6216fa3f2802 100644 --- a/include/asm-x86_64/e820.h +++ b/include/asm-x86_64/e820.h | |||
@@ -46,6 +46,7 @@ extern void e820_mark_nosave_regions(void); | |||
46 | extern void e820_print_map(char *who); | 46 | extern void e820_print_map(char *who); |
47 | extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type); | 47 | extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type); |
48 | extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); | 48 | extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); |
49 | extern unsigned long e820_hole_size(unsigned long start, unsigned long end); | ||
49 | 50 | ||
50 | extern void e820_setup_gap(void); | 51 | extern void e820_setup_gap(void); |
51 | extern void e820_register_active_regions(int nid, | 52 | extern void e820_register_active_regions(int nid, |
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index 39ef106986eb..fb558fb1d211 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h | |||
@@ -47,5 +47,10 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | |||
47 | extern int pfn_valid(unsigned long pfn); | 47 | extern int pfn_valid(unsigned long pfn); |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifdef CONFIG_NUMA_EMU | ||
51 | #define FAKE_NODE_MIN_SIZE (64*1024*1024) | ||
52 | #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1ul)) | ||
53 | #endif | ||
54 | |||
50 | #endif | 55 | #endif |
51 | #endif | 56 | #endif |