Re: [PATCH v5 07/17] mm/sparse-vmemmap: move helpers ahead of future callers

From: Qi Zheng

Date: Tue Aug 25 2026 - 06:58:18 EST




On 8/25/26 4:45 PM, Muchun Song wrote:
Prepare for section-based vmemmap optimization by moving helpers that
follow-up changes will use. vmemmap_get_tail() will be called from the PTE
population path. section_nr_vmemmap_pages() will be made visible outside
the memory hotplug code and called from sparse_init_nid().

Move vmemmap_alloc_block_zero() together with vmemmap_get_tail(), since
the tail helper depends on it. Move section_nr_vmemmap_pages() earlier
into its own CONFIG_MEMORY_HOTPLUG block. That lets the later patch change
its visibility and callers without also moving the function body.

No functional change is intended.

Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

Acked-by: Qi Zheng <qi.zheng@xxxxxxxxx>

Thanks,
Qi