in case, you have one 32bit system without RAM installed on node0. please check
Thanks
Yinghai
Subject: [PATCH] x86: Fix 32bit system without RAM on Node0
when 32bit numa is used, free_all_bootmem() will still only go over with
node id 0.
If node 0 doesn't have RAM installed, We need to go with node1
because early_node_map still use 1 for all ranges, and ram from node1
becom low ram.
Try to use MAX_NUMNODES like 64 numa does.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/mm/init_32.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6/arch/x86/mm/init_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init_32.c
+++ linux-2.6/arch/x86/mm/init_32.c
@@ -875,7 +875,12 @@ void __init mem_init(void)
BUG_ON(!mem_map);
#endif
/* this will put all low memory onto the freelists */
+#if defined(CONFIG_NO_BOOTMEM) && defined(MAX_NUMNODES)
+ /* In case some 32bit systems don't have RAM installed on node0 */
+ totalram_pages += free_all_memory_core_early(MAX_NUMNODES);
+#else
totalram_pages += free_all_bootmem();
+#endif
reservedpages = 0;
for (tmp = 0; tmp < max_low_pfn; tmp++)
--