Re: [PATCH 13/49] mm: integrate sparse_vmemmap_init_nid_late() into sparse_init_nid()

Mike Rapoport
2026-04-28T07:19:03Z

On Sun, Apr 05, 2026 at 08:52:04PM +0800, Muchun Song wrote:
> Move the call to sparse_vmemmap_init_nid_late() from mm_core_init_early()
> into sparse_init_nid().
>
> Since sparse_init() has been deferred until after zone initialization,
> the zone data structures are now available during sparse_init(). This
> satisfies the requirements of sparse_vmemmap_init_nid_late(), allowing
> it to be moved safely.
>
> This change unifies the vmemmap initialization steps by placing both
> sparse_vmemmap_init_nid_early() and sparse_vmemmap_init_nid_late()
> within the sparse memory initialization logic, making the code structure
> clearer.
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
> mm/mm_init.c | 4 ----
> mm/sparse.c | 2 ++
> 2 files changed, 2 insertions(+), 4 deletions(-)

--
Sincerely yours,
Mike.