Skip to contentSkip to conversation

kho-make-sure-preservations-do-not-span-multiple-numa-nodes.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 29

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kho: make sure preservations do not span multiple NUMA nodes
has been removed from the -mm tree. Its filename was
kho-make-sure-preservations-do-not-span-multiple-numa-nodes.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: "Pratyush Yadav (Google)" <[email protected]>
Subject: kho: make sure preservations do not span multiple NUMA nodes
Date: Mon, 9 Mar 2026 12:34:06 +0000

The KHO restoration machinery is not capable of dealing with preservations that span multiple NUMA nodes. kho_preserve_folio() guarantees the preservation will only span one NUMA node since folios can't span multiple nodes.

This leaves kho_preserve_pages(). While semantically kho_preserve_pages() only deals with 0-order pages, so all preservations should be single page only, in practice it combines preservations to higher orders for efficiency. This can result in a preservation spanning multiple nodes. Break up the preservations into a smaller order if that happens.

---

 kernel/liveupdate/kexec_handover.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
kernel/liveupdate/kexec_handover.c renamed from kernel/liveupdate/kexec_handover.c~kho-make-sure-preservations-do-not-span-multiple-numa-nodes +9 -1
@@ -870,9 +870,17 @@ int kho_preserve_pages(struct page *page
 	}
 
 	while (pfn < end_pfn) {
-		const unsigned int order =
+		unsigned int order =
 			min(count_trailing_zeros(pfn), ilog2(end_pfn - pfn));
 
+		/*
+		 * Make sure all the pages in a single preservation are in the
+		 * same NUMA node. The restore machinery can not cope with a
+		 * preservation spanning multiple NUMA nodes.
+		 */
+		while (pfn_to_nid(pfn) != pfn_to_nid(pfn + (1UL << order) - 1))
+			order--;
+
 		err = kho_radix_add_page(tree, pfn, order);
 		if (err) {
 			failed_pfn = pfn;

_

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