x86: fix booting non-NUMA system with NUMA config
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 x86: fix booting non-NUMA system with NUMA config
Quoted 6 lines · Hugh Dickins
This used to work fine, but around the time your abstract discontigmem patches went into -mm, the resulting kernel failed to boot - blank screen after grub for a few seconds, until it reboots again. And now your patches have just gone into mainline, that resulting kernel fails to boot. I've not done a binary search to identify any one of your patches as the culprit, but you are my Number One suspect ;)
Hugh, you caught me. There is, indeed, a bug booting with CONFIG_NUMA=y, CONFIG_X86_GENERICARCH=y, and booting on a non-NUMA system. While not the most common configuration, it should surely be supported.
memmap_init_zone() is the first user to do pfn_to_nid(), which relies on physnode_map[] to be done properly. memory_present() was supposed to do that, but never got called for the flat configuration, so pfn_to_nid() was returning -1 on valid pages.
Andrew, please apply and forward the attached patch on to Linus. It affects code currently in -bk.
Test compiled and booted on 4-way non-NUMA x86 system.
-- Dave
---
memhotplug-dave/arch/i386/mm/discontig.c | 1 + 1 files changed, 1 insertion(+)
arch/i386/mm/discontig.c renamed from arch/i386/mm/discontig.c~memory_present_for_flat +1 -0
@@ -121,6 +121,7 @@ int __init get_memcfg_numa_flat(void)find_max_pfn (); node_start_pfn[0 ] =0 ; node_end_pfn[0 ] = max_pfn; +memory_present (0 ,0 , max_pfn);/* Indicate there is one node available. */ nodes_clear (node_online_map);
_
Quoted 5 lines · Dave Hansen
Hugh, you caught me. There is, indeed, a bug booting with
CONFIG_NUMA=y,CONFIG_X86_GENERICARCH=y, and booting on a non-NUMA system. While not the most common configuration, it should surely be supported.
Lovely, Dave, thanks a lot, I confirm your patch works for me. Now I can impress the neighbours again with my little "NUMA" system.
Hugh
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>