Skip to contentSkip to conversation

+ x86_64-set-node_possible_map-at-runtime-fix.patch added to -mm tree

PATCH New [email protected] 2 participants 2 messages Apr 9, 2007 – Apr 11, 2007 1 message not in the archive

lore
Share & tools
lore

[email protected]

author tree notice
#0 lore raw

The patch titled

     x86_64-set-node_possible_map-at-runtime fix
has been added to the -mm tree.  Its filename is
     x86_64-set-node_possible_map-at-runtime-fix.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this

------------------------------------------------------
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.

Cc Suresh Siddha <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Christoph Lameter <[email protected]>

---

 arch/x86_64/mm/numa.c |    1 +
 1 files changed, 1 insertion(+)
arch/x86_64/mm/numa.c renamed from arch/x86_64/mm/numa.c~x86_64-set-node_possible_map-at-runtime-fix +1 -0
diff -puN arch/x86_64/mm/numa.c~x86_64-set-node_possible_map-at-runtime-fix arch/x86_64/mm/numa.c
@@ -500,6 +500,7 @@ void __init numa_initmem_init(unsigned l
 #ifdef CONFIG_NUMA_EMU
 	if (cmdline && !numa_emulation(start_pfn, end_pfn))
  		return;
+	nodes_clear(node_possible_map);
 #endif
 
 #ifdef CONFIG_ACPI_NUMA

_

Patches currently in -mm which might be from [email protected] are

x86_64-set-node_possible_map-at-runtime.patch x86_64-set-node_possible_map-at-runtime-fix.patch slab-x86_64-skip-cache_free_alien-on-non-numa.patch i386-add-ptep_test_and_clear_dirtyyoung.patch i386-use-pte_update_defer-in-ptep_test_and_clear_dirtyyoung.patch i386-use-pte_update_defer-in-ptep_test_and_clear_dirtyyoung-fix.patch smaps-extract-pmd-walker-from-smaps-code.patch smaps-add-pages-referenced-count-to-smaps.patch smaps-add-clear_refs-file-to-clear-reference.patch smaps-add-clear_refs-file-to-clear-reference-fix.patch smaps-add-clear_refs-file-to-clear-reference-fix-fix.patch smaps-add-clear_refs-file-to-clear-reference-fix-fix-2.patch smaps-add-clear_refs-file-to-clear-reference-cleanup.patch smaps-use-ptep_test_and_clear_young.patch smaps-add-clear_refs-file-to-clear-reference-docs.patch maps2-uninline-some-functions-in-the-page-walker.patch maps2-eliminate-the-pmd_walker-struct-in-the-page-walker.patch maps2-remove-vma-from-args-in-the-page-walker.patch maps2-propagate-errors-from-callback-in-page-walker.patch maps2-add-callbacks-for-each-level-to-page-walker.patch maps2-move-the-page-walker-code-to-lib.patch maps2-move-the-page-walker-code-to-lib-fix.patch maps2-simplify-interdependence-of-proc-pid-maps-and-smaps.patch maps2-move-clear_refs-code-to-task_mmuc.patch maps2-regroup-task_mmu-by-interface.patch maps2-make-proc-pid-smaps-optional-under-config_embedded.patch maps2-make-proc-pid-clear_refs-option-under-config_embedded.patch maps2-add-proc-pid-pagemap-interface.patch maps2-add-proc-kpagemap-interface.patch

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/1 x86_64: more fixes to node_possible_map runtime setup

Quoted 10 lines · Suresh B
Quoted 6 lines · 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.

---

arch/x86_64/mm/numa.c renamed from arch/x86_64/mm/numa.c~ +3 -2
@@ -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");