Skip to contentSkip to conversation

mm-mark-early-init-static-variables-with-__meminitdata.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: mm: mark early-init static variables with __meminitdata
has been removed from the -mm tree. Its filename was
mm-mark-early-init-static-variables-with-__meminitdata.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: Kaitao Cheng <[email protected]>
Subject: mm: mark early-init static variables with __meminitdata
Date: Sat, 21 Mar 2026 20:08:47 +0800

Static variables defined inside __meminit functions should also be marked with __meminitdata, so that their storage is placed in the .init.data section and reclaimed with free_initmem(), thereby reducing permanent .bss memory usage when CONFIG_MEMORY_HOTPLUG is disabled.

Cc David Hildenbrand <[email protected]>
Cc Liam Howlett <[email protected]>
Cc Lorenzo Stoakes (Oracle) <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Suren Baghdasaryan <[email protected]>

---

 mm/mm_init.c        |    2 +-
 mm/sparse-vmemmap.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
mm/mm_init.c renamed from mm/mm_init.c~mm-mark-early-init-static-variables-with-__meminitdata +1 -1
@@ -812,7 +812,7 @@ void __meminit reserve_bootmem_region(ph
 static bool __meminit
 overlap_memmap_init(unsigned long zone, unsigned long *pfn)
 {
-	static struct memblock_region *r;
+	static struct memblock_region *r __meminitdata;
 
 	if (mirrored_kernelcore && zone == ZONE_MOVABLE) {
 		if (!r || *pfn >= memblock_region_memory_end_pfn(r)) {
mm/sparse-vmemmap.c renamed from mm/sparse-vmemmap.c~mm-mark-early-init-static-variables-with-__meminitdata +1 -1
@@ -62,7 +62,7 @@ void * __meminit vmemmap_alloc_block(uns
 	if (slab_is_available()) {
 		gfp_t gfp_mask = GFP_KERNEL|__GFP_RETRY_MAYFAIL|__GFP_NOWARN;
 		int order = get_order(size);
-		static bool warned;
+		static bool warned __meminitdata;
 		struct page *page;
 
 		page = alloc_pages_node(node, gfp_mask, order);

_

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