* [PATCH] x86: fix booting non-NUMA system with NUMA config
[not found] <Pine.LNX.4.61.0503111922520.9403@goblin.wat.veritas.com>
@ 2005-03-11 20:37 ` Dave Hansen
2005-03-11 21:19 ` Hugh Dickins
0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2005-03-11 20:37 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Andrew Morton, linux-mm
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
On Fri, 2005-03-11 at 19:25 +0000, Hugh Dickins wrote:
> 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
[-- Attachment #2: memory_present_for_flat.patch --]
[-- Type: text/x-patch, Size: 609 bytes --]
---
memhotplug-dave/arch/i386/mm/discontig.c | 1 +
1 files changed, 1 insertion(+)
diff -puN arch/i386/mm/discontig.c~memory_present_for_flat arch/i386/mm/discontig.c
--- memhotplug/arch/i386/mm/discontig.c~memory_present_for_flat 2005-03-11 12:29:45.000000000 -0800
+++ memhotplug-dave/arch/i386/mm/discontig.c 2005-03-11 12:30:04.000000000 -0800
@@ -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);
_
^ permalink raw reply [flat|nested] 2+ messages in thread