Re: [PATCH 09/14] mm/sparse: remove CONFIG_MEMORY_HOTPLUG-specific usemap allocation handling

David Hildenbrand (Arm)
2026-03-20T18:58:17Z

>>
>> Anyway I'm also confused by 'given we don't free the pgdat any more', but the
>> comment says a 'pgdat can prevent a section being removed' rather than anything
>> about it being removed?
>
> Well, if a pgdat resides in some memory section, given that it is
> unmovable turns the whole memory section unremovable -> hotunplug fails.
>
> Assuming you could free the pgdat when the node goes offlining, you
> would turn that memory section removable.
>
> And I think that commit somehow assumed that the last memory section
> could be removed if all it contains is the corresponding pgdat (which
> was never the case).

I decided to just drop that whole comment block completely.

--
Cheers,

David