Re: [PATCH 02/12] mm/sparse: refactor sparse_sections_init()
From: David Hildenbrand (Arm)
Date: Wed Sep 09 2026 - 14:02:32 EST
On 9/9/26 19:09, Oscar Salvador (SUSE) wrote:
> 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?
Munchus patch added it, and I asked him to remove that comment (as it's
imprecise). So I expect, once I rebase on top of his updated work, that that
comment will be gone right away :)
Thanks!
--
Cheers,
David