Skip to contentSkip to conversation

mm-sparse-move-mem_section-init-to-sparse_extreme_init.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 24

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/sparse: move mem_section init to sparse_extreme_init()
has been removed from the -mm tree. Its filename was
mm-sparse-move-mem_section-init-to-sparse_extreme_init.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: "David Hildenbrand (Arm)" <[email protected]>
Subject: mm/sparse: move mem_section init to sparse_extreme_init()
Date: Mon, 21 Sep 2026 21:58:53 +0200

Patch series "mm/sparse: remove SECTION_MARKED_PRESENT and further cleanups", v2.

SECTION_MARKED_PRESENT is really only needed during boot, where we can instead just rely on SECTION_IS_EARLY_BIT by setting that flag earlier.

Some preparations for doing that conversion and some cleanups in the same (sparse) area.

This patch (of 13):

Let's just avoid another pair of ifdef inside a function. While at it, switch to INTERNODE_CACHE_BYTES by just defining a fallback in cache.h as well, given that the x86 variant already provides one.

Cc Liam R. Howlett <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Kairui Song <[email protected]>
Cc Qi Zheng <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Barry Song <[email protected]>
Cc Axel Rasmussen <[email protected]>
Cc Yuanchu Xie <[email protected]>
Cc Wei Xu <[email protected]>
Cc Baoquan He <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Brendan Jackman <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Jan Kiszka <[email protected]>
Cc Kieran Bingham <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Danilo Krummrich <[email protected]>

---

 include/linux/cache.h |    1 +
 mm/sparse.c           |   19 ++++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
include/linux/cache.h renamed from include/linux/cache.h~mm-sparse-move-mem_section-init-to-sparse_extreme_init +1 -0
@@ -89,6 +89,7 @@
  */
 #ifndef INTERNODE_CACHE_SHIFT
 #define INTERNODE_CACHE_SHIFT L1_CACHE_SHIFT
+#define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
 #endif
 
 #if !defined(____cacheline_internodealigned_in_smp)
mm/sparse.c renamed from mm/sparse.c~mm-sparse-move-mem_section-init-to-sparse_extreme_init +12 -7
@@ -103,11 +103,22 @@ int __meminit sparse_index_init(unsigned
 
 	return 0;
 }
+
+static void __init sparse_extreme_init(void)
+{
+	const unsigned long size = sizeof(struct mem_section *) * NR_SECTION_ROOTS;
+
+	mem_section = memblock_alloc_or_panic(size, INTERNODE_CACHE_BYTES);
+}
 #else /* !SPARSEMEM_EXTREME */
 int __meminit sparse_index_init(unsigned long section_nr, int nid)
 {
 	return 0;
 }
+
+static void __init sparse_extreme_init(void)
+{
+}
 #endif
 
 /*
@@ -196,13 +207,7 @@ void __init sparse_sections_init(void)
 	unsigned long start, end;
 	int i, nid;
 
-#ifdef CONFIG_SPARSEMEM_EXTREME
-	unsigned long size, align;
-
-	size = sizeof(struct mem_section *) * NR_SECTION_ROOTS;
-	align = 1 << (INTERNODE_CACHE_SHIFT);
-	mem_section = memblock_alloc_or_panic(size, align);
-#endif
+	sparse_extreme_init();
 
 	for_each_mem_pfn_range(i, MAX_NUMNODES, &start, &end, &nid)
 		memory_present(nid, start, end);

_

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

mm-fix-address-wraparound-when-scanning-large-folio-ptes.patch mm-hugetlb-disable-pmd-sharing-for-uffd-missing-mode.patch mm-vma-write-lock-source-vma-before-duplicating-it-in-__split_vma.patch mm-madvise-preserve-vma_softdirty_bit-when-changing-anonymous-names.patch