Re: [PATCH 02/12] mm/sparse: refactor sparse_sections_init()
From: Oscar Salvador (SUSE)
Date: Wed Sep 09 2026 - 13:14:41 EST
On Wed, Sep 09, 2026 at 03:32:55PM +0200, David Hildenbrand (Arm) wrote:
> memory_present() really identifies+prepares all early sections so the
> initialization in sparse_init() can properly iterating them to
> initialize metadata.
>
> Let's just inline memory_present() into sparse_sections_init() and
> cleaning up the code a bit while at it: make it clear that we are operating
> on pfns.
>
> Note that we call set_section_nid() now only if the section
> was not already created earlier. Now, there is no more inconsistency
> between what we (temporarily) store in ms->section_mem_map and what
> we store in our section->nid array.
>
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Acked-by: Oscar Salvador <osalvador@xxxxxxx>
Not sure if it was intentional, but it seems we lost the "Initialize memory section ..."
comment.
Do we want to put it back? Maybe for the folks that are not really
familiar with all the memory section's inner stuff?
Besides that, nice cleanup :-)
--
Oscar Salvador
SUSE Labs