On Mon, Apr 09, 2007 at 04:13:28PM -0700, Siddha, Suresh B wrote: > On Mon, Apr 09, 2007 at 03:05:01PM -0700, [EMAIL PROTECTED] wrote: > > Subject: x86_64-set-node_possible_map-at-runtime fix > > From: David Rientjes <[EMAIL PROTECTED]> > > > > Clear node_possible_map if numa_emulation() fails for some reason, such as > > a failed hash shift, but setup_node_range() has already set some fake nodes > > as online. > > David, Looking at your fix, I think we require more fixes in this area. > Please review the appended patch. Thanks.
Andrew, Please apply the appended patch. Goes on top of the x86_64-set-node_possible_map-at-runtime-fix.patch thanks, suresh --- Subject: [patch] x86_64: more fixes to node_possible_map runtime setup From: Suresh Siddha <[EMAIL PROTECTED]> More fixes in the failure cases and a small cleanup in numa emulation case. Signed-off-by: Suresh Siddha <[EMAIL PROTECTED]> Acked-by: David Rientjes <[EMAIL PROTECTED]> --- --- linux-2.6.21-rc6/arch/x86_64/mm/numa.c~ 2007-04-09 15:59:03.000000000 -0700 +++ linux-2.6.21-rc6/arch/x86_64/mm/numa.c 2007-04-09 17:44:38.000000000 -0700 @@ -298,7 +298,6 @@ static int __init setup_node_range(int n ret = -1; } nodes[nid].end = *addr; - node_set_online(nid); node_set(nid, node_possible_map); printk(KERN_INFO "Faking node %d at %016Lx-%016Lx (%LuMB)\n", nid, nodes[nid].start, nodes[nid].end, @@ -483,7 +482,7 @@ out: * SRAT. */ remove_all_active_ranges(); - for_each_online_node(i) { + for_each_node_mask(i, node_possible_map) { e820_register_active_regions(i, nodes[i].start >> PAGE_SHIFT, nodes[i].end >> PAGE_SHIFT); setup_node_bootmem(i, nodes[i].start, nodes[i].end); @@ -510,11 +509,13 @@ void __init numa_initmem_init(unsigned l if (!numa_off && !acpi_scan_nodes(start_pfn << PAGE_SHIFT, end_pfn << PAGE_SHIFT)) return; + nodes_clear(node_possible_map); #endif #ifdef CONFIG_K8_NUMA if (!numa_off && !k8_scan_nodes(start_pfn<<PAGE_SHIFT, end_pfn<<PAGE_SHIFT)) return; + nodes_clear(node_possible_map); #endif printk(KERN_INFO "%s\n", numa_off ? "NUMA turned off" : "No NUMA configuration found"); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/