lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 3 Mar 2008 16:27:11 +0000
From:	Mel Gorman <mel@....ul.ie>
To:	Yinghai Lu <yhlu.kernel@...il.com>
Cc:	Mike Travis <travis@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, tglx@...utronix.de,
	Christoph Lameter <clameter@....com>,
	Jack Steiner <steiner@....com>
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@....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@....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@....com>
    Signed-off-by: Ingo Molnar <mingo@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ