Messages in this thread Patch in this message | | | Date | Mon, 3 Mar 2008 16:27:11 +0000 | From | Mel Gorman <> | Subject | Re: 2.6.24 git2/mm1: cpu_to_node mapping to non-existant nodes causing boot failure |
| |
On (28/02/08 09:45), Yinghai Lu didst pronounce: > On Thu, Feb 28, 2008 at 7:42 AM, Mel Gorman <mel@csn.ul.ie> wrote: > > On (26/02/08 22:29), Yinghai Lu didst pronounce: > > > > > > > > > > > > Did you get a chance to try out this patch to see if it cleared up the problem > > > > > booting on your x86_64 numa box? > > > > > > did it fail with x86.git#testing? > > > > > > > No, it boots successfully with that git branch. Somewhere in there is a fix. > > > > can you verify which one fix that ? > > http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-x86.git;a=commitdiff;h=a8de04ce4e4cf0af94aeb3829be8c9f813b2f5de
This one was the fix.
commit a8de04ce4e4cf0af94aeb3829be8c9f813b2f5de Author: Yinghai Lu <Yinghai.Lu@Sun.COM> Date: Tue Feb 19 15:35:54 2008 -0800
x86_64: not set node to cpu_to_node if the node is not online
numa_init_array will set round-bin to all cpu to online nodes. init_cpu_to_node will use cpu->apic (from MADT or mptable) and apic->node(from SRAT or AMD config space with k8_bus_64.c) to have cpu->node mapping. and later identify_cpu will overwrite them again...(with nearby_node...)
this patch will check if the node is online, otherwise will not update cpu_node map. so keep cpu_node map to online node before identify_cpu..., to prevent possible error.
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index f744c46..0c9b2bd 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c @@ -620,13 +620,17 @@ void __init init_cpu_to_node(void) int i; for (i = 0; i < NR_CPUS; i++) { + int node; u16 apicid = x86_cpu_to_apicid_init[i]; if (apicid == BAD_APICID) continue; - if (apicid_to_node[apicid] == NUMA_NO_NODE) + node = apicid_to_node[apicid]; + if (node == NUMA_NO_NODE) continue; - numa_set_node(i, apicid_to_node[apicid]); + if (!node_online(node)) + continue; + numa_set_node(i, node); } } -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab
| |