mm/sparse: remove SECTION_MARKED_PRESENT and further cleanups
Get series with b4
b4 am [email protected] change-id 20260814-b4-sparsemem_cleanups-8bc4b47014c3Versions newest first
- v2 Latest13 patches 11 repliesIn review 12 of 13 applied
- v112 patches 46 repliesSuperseded
Changes in v2 from the cover letter
- Rebased to mm-unstable
- Add "scripts/gdb: mm.py: remove fallbacks for SECTION_HAS_MEM_MAP and SECTION_IS_EARLY"
- Improve comment in mmzone.h for __highest_used_section_nr
- Improve comment in fs/proc/page.c for get_max_dump_pfn()
- Move __highest_used_section_nr handling directly into
__section_mark_present() callers and use max()
- Make pfn const in sparse_metadata_init_nid()
- Take care of .clang_format
- Smaller patch description fixes
- Link to v1: https://patch.msgid.link/[email protected]
Patches in v2 12 of 13 applied
Reviews trailers per patch
12 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Oscar Salvador | Lorenzo Stoakes (ARM) | Mike Rapoport (Microsoft) | Zi Yan |
|---|---|---|---|---|
| 1/13 | A-b | R-b | R-b | R-b |
| 2/13 | A-b | A-b | R-b | |
| 3/13 | A-b | R-b | R-b | |
| 4/13 | A-b | R-b | R-b | |
| 5/13 | A-b | R-b | R-b | |
| 6/13 | A-b | R-b | R-b | |
| 7/13 | A-b | R-b | R-b | |
| 8/13 | A-b | R-b | ||
| 9/13 | ||||
| 10/13 | A-b | A-b | R-b | |
| 11/13 | A-b | R-b | R-b | |
| 12/13 | A-b | A-b | R-b | |
| 13/13 | A-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v2 00/13] mm/sparse: remove SECTION_MARKED_PRESENT and further cleanups
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.
---
Changes in v2:
- Rebased to mm-unstable
- Add "scripts/gdb: mm.py: remove fallbacks for SECTION_HAS_MEM_MAP and SECTION_IS_EARLY"
- Improve comment in mmzone.h for __highest_used_section_nr
- Improve comment in fs/proc/page.c for get_max_dump_pfn()
- Move __highest_used_section_nr handling directly into
__section_mark_present() callers and use max()
- Make pfn const in sparse_metadata_init_nid()
- Take care of .clang_format
- Smaller patch description fixes
- Link to v1: https://patch.msgid.link/[email protected]
To: Andrew Morton <[email protected]>
To: David Hildenbrand <[email protected]>
To: Lorenzo Stoakes <[email protected]>
To: "Liam R. Howlett" <[email protected]>
To: Vlastimil Babka <[email protected]>
To: Mike Rapoport <[email protected]>
To: Suren Baghdasaryan <[email protected]>
To: Michal Hocko <[email protected]>
To: Kairui Song <[email protected]>
To: Qi Zheng <[email protected]>
To: Shakeel Butt <[email protected]>
To: Barry Song <[email protected]>
To: Axel Rasmussen <[email protected]>
To: Yuanchu Xie <[email protected]>
To: Wei Xu <[email protected]>
To: Baoquan He <[email protected]>
To: Baolin Wang <[email protected]>
To: Brendan Jackman <[email protected]>
To: Johannes Weiner <[email protected]>
To: Zi Yan <[email protected]>
To: Jan Kiszka <[email protected]>
To: Kieran Bingham <[email protected]>
To: Oscar Salvador <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: "Rafael J. Wysocki" <[email protected]>
To: Danilo Krummrich <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
David Hildenbrand (Arm) (13):
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
scripts/gdb: mm.py: remove fallbacks for SECTION_HAS_MEM_MAP and SECTION_IS_EARLY 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()
.clang-format | 2 +- 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 | 4 +- mm/sparse.c | 160 +++++++++++++++++++++++------------------------- mm/sparse.h | 19 ++---- scripts/gdb/linux/mm.py | 8 +-- 11 files changed, 108 insertions(+), 149 deletions(-)
---
base-commit: 8d61431ed2607386b427752505379536eb634ce8
change-id: 20260814-b4-sparsemem_cleanups-8bc4b47014c3
--
Cheers,
David