[PATCH 00/12] mm/sparse: remove SECTION_MARKED_PRESENT and further cleanups
From: David Hildenbrand (Arm)
Date: Wed Sep 09 2026 - 10:30:06 EST
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.
Tested on x86 with and without memory hotplug through virtio-mem.
This is based on mm-unstable which carries Muchun's
"[PATCH v5 00/17] mm: Introduce section-based vmemmap optimization
for HugeTLB" [1]
A (possible) resend from Muchun should only result in smaller conflicts.
[1] https://lore.kernel.org/r/20260825084608.47437-1-songmuchun@xxxxxxxxxxxxx
Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
---
David Hildenbrand (Arm) (12):
mm/sparse: move mem_section init to sparse_extreme_init()
mm/sparse: refactor sparse_sections_init()
mm/sparse: move initialization of section metadata to sparse_metadata_init()
mm/sparse: rename and cleanup sparse_init_nid()
mm/sparse: cleanup sparse_init_one_section()
mm/sparse: rename __highest_present_section_nr to __highest_used_section_nr
mm/sparse: remove pfn_in_present_section()
mm/sparse: move __highest_used_section_nr handling
mm/sparse: remove SECTION_MARKED_PRESENT
mm/sparse: remove flags parameter from sparse_init_one_section()
fs/proc/page: clarify comment in get_max_dump_pfn()
mm/memory_hotplug: drop CONFIG_HAVE_ARCH_PFN_VALID handling from pfn_to_online_page()
drivers/base/memory.c | 2 +-
fs/proc/page.c | 7 +--
include/linux/cache.h | 1 +
include/linux/mmzone.h | 43 ++++---------
mm/compaction.c | 2 +-
mm/memory_hotplug.c | 9 +--
mm/sparse-vmemmap.c | 3 +-
mm/sparse.c | 160 +++++++++++++++++++++++-------------------------
mm/sparse.h | 21 +++----
scripts/gdb/linux/mm.py | 2 +-
10 files changed, 107 insertions(+), 143 deletions(-)
---
base-commit: b02c77c78ff74d3d88ea614335ae833e01ed5d30
change-id: 20260814-b4-sparsemem_cleanups-8bc4b47014c3
--
Cheers,
David