aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm/numa.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-04-07 13:49:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-09 14:53:16 -0400
commit68a3a7feb08f960095072f28ec20f7900793c506 (patch)
tree1d458822fd4414997b6f12ad8a915f785d7e730f /arch/x86_64/mm/numa.c
parent9d99aaa31f5994d1923c3713ce9144c4c42332e1 (diff)
[PATCH] x86_64: Reserve SRAT hotadd memory on x86-64
From: Keith Mannthey, Andi Kleen Implement memory hotadd without sparsemem. The memory in the SRAT hotadd area is just preserved instead and can be activated later. There are a few restrictions: - Only one continuous hotadd area allowed per node The main problem is dealing with the many buggy SRAT tables that are out there. The strategy here is to reject anything suspicious. Originally from Keith Mannthey, with several hacks and changes by AK and also contributions from Andrew Morton [ TBD: Problems pointed out by KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>: 1) Goto's rebuild_zonelist patch will not work if CONFIG_MEMORY_HOTPLUG=n. Rebuilding zonelist is necessary when the system has just memory < 4G at boot, and hot add memory > 4G. because x86_64 has DMA32, ZONE_NORAML is not included into zonelist at boot time if system doesn't have memory >4G at boot. [AK: should just force the higher zones at boot time when SRAT tells us] 2) zone and node's spanned_pages and present_pages are not incremented. They should be. For example, our server (ia64/Fujitsu PrimeQuest) can equip memory from 4G to 1T(maybe 2T in future), and SRAT will *always* say we have possible 1T +memory. (Microsoft requires "write all possible memory in SRAT") When we reserve memmap for possible 1T memory, Linux will not work well in +minimum 4G configuraion ;) [AK: needs limiting to 5-10% of max memory] ] Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/mm/numa.c')
-rw-r--r--arch/x86_64/mm/numa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
index 4be82d6e2b48..779132af29a7 100644
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -142,6 +142,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en
142 142
143 reserve_bootmem_node(NODE_DATA(nodeid), nodedata_phys, pgdat_size); 143 reserve_bootmem_node(NODE_DATA(nodeid), nodedata_phys, pgdat_size);
144 reserve_bootmem_node(NODE_DATA(nodeid), bootmap_start, bootmap_pages<<PAGE_SHIFT); 144 reserve_bootmem_node(NODE_DATA(nodeid), bootmap_start, bootmap_pages<<PAGE_SHIFT);
145#ifdef CONFIG_ACPI_NUMA
146 srat_reserve_add_area(nodeid);
147#endif
145 node_set_online(nodeid); 148 node_set_online(nodeid);
146} 149}
147 150
@@ -335,6 +338,8 @@ __init int numa_setup(char *opt)
335#ifdef CONFIG_ACPI_NUMA 338#ifdef CONFIG_ACPI_NUMA
336 if (!strncmp(opt,"noacpi",6)) 339 if (!strncmp(opt,"noacpi",6))
337 acpi_numa = -1; 340 acpi_numa = -1;
341 if (!strncmp(opt,"hotadd=", 7))
342 hotadd_percent = simple_strtoul(opt+7, NULL, 10);
338#endif 343#endif
339 return 1; 344 return 1;
340} 345}