浏览代码

[PATCH] x86_64: Always pass full number of nodes to NUMA hash computation

Previously the numa hash code would be confused by holes in the node space
and stop early. This is the first part of the fix for the non boot issue
with empty nodes on Opterons.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen 19 年之前
父节点
当前提交
2aed711a39
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      arch/x86_64/mm/k8topology.c
  2. 1 1
      arch/x86_64/mm/srat.c

+ 1 - 1
arch/x86_64/mm/k8topology.c

@@ -155,7 +155,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
 	if (!found)
 	if (!found)
 		return -1; 
 		return -1; 
 
 
-	memnode_shift = compute_hash_shift(nodes, numnodes);
+	memnode_shift = compute_hash_shift(nodes, 8);
 	if (memnode_shift < 0) { 
 	if (memnode_shift < 0) { 
 		printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); 
 		printk(KERN_ERR "No NUMA node hash function found. Contact maintainer\n"); 
 		return -1; 
 		return -1; 

+ 1 - 1
arch/x86_64/mm/srat.c

@@ -271,7 +271,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
 		return -1;
 		return -1;
 	}
 	}
 
 
-	memnode_shift = compute_hash_shift(nodes, nodes_weight(nodes_parsed));
+	memnode_shift = compute_hash_shift(nodes, MAX_NUMNODES);
 	if (memnode_shift < 0) {
 	if (memnode_shift < 0) {
 		printk(KERN_ERR
 		printk(KERN_ERR
 		     "SRAT: No NUMA node hash function found. Contact maintainer\n");
 		     "SRAT: No NUMA node hash function found. Contact maintainer\n");