Skip to contentSkip to conversation

x86-numa-use-get_pfn_range_for_nid-to-verify-that-node-spans-memory.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 4, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: x86/numa: use get_pfn_range_for_nid to verify that node spans memory
has been removed from the -mm tree. Its filename was
x86-numa-use-get_pfn_range_for_nid-to-verify-that-node-spans-memory.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <[email protected]>
Subject: x86/numa: use get_pfn_range_for_nid to verify that node spans memory
Date: Wed, 7 Aug 2024 09:40:55 +0300

Instead of looping over numa_meminfo array to detect node's start and end addresses use get_pfn_range_for_init().

This is shorter and make it easier to lift numa_memblks to generic code.

Cc Alexander Gordeev <[email protected]>
Cc Andreas Larsson <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc David S. Miller <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Huacai Chen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiaxun Yang <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Rob Herring (Arm) <[email protected]>
Cc Samuel Holland <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vasily Gorbik <[email protected]>
Cc Will Deacon <[email protected]>

---

 arch/x86/mm/numa.c |   17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
arch/x86/mm/numa.c renamed from arch/x86/mm/numa.c~x86-numa-use-get_pfn_range_for_nid-to-verify-that-node-spans-memory +7 -10
@@ -521,17 +521,14 @@ static int __init numa_register_memblks(
 
 	/* Finally register nodes. */
 	for_each_node_mask(nid, node_possible_map) {
-		u64 start = PFN_PHYS(max_pfn);
-		u64 end = 0;
+		unsigned long start_pfn, end_pfn;
 
-		for (i = 0; i < mi->nr_blks; i++) {
-			if (nid != mi->blk[i].nid)
-				continue;
-			start = min(mi->blk[i].start, start);
-			end = max(mi->blk[i].end, end);
-		}
-
-		if (start >= end)
+		/*
+		 * Note, get_pfn_range_for_nid() depends on
+		 * memblock_set_node() having already happened
+		 */
+		get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
+		if (start_pfn >= end_pfn)
 			continue;
 
 		alloc_node_data(nid);

_

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