Re: [PATCH 05/10] x86/mm: stop marking vmemmap as SECTION_INFO

From: David Hildenbrand (Arm)

Date: Wed Jul 08 2026 - 11:27:10 EST


On 7/8/26 16:11, David Hildenbrand (Arm) wrote:
> We added the whole bootmem registration machinery in commit 04753278769f
> ("memory hotplug: register section/node id to free").
>
> The main use case was to remember to which memory section memmap pages
> belonged, so the memmap could be handled accordingly when freeing
> memory.
>
> However, all that machinery is not required anymore: a memory section
> can only get offlined if *all* pages can get offlined; and it can only
> get unplugged once offline. If some of these pages are unmovable memmap
> pages: bad luck, doesn't work. Offlining will fail.
>
> Further, a lot of this machinery was required for pre-vmemmap support.
> Now we only support the vmemmap with memory hotplug.
>
> So the whole machinery is useless today. Let's start by removing the
> last pieces by first stopping to mark vmemmap pages as SECTION_INFO.
> In free_vmemmap_pages(), we can now always just free the reserved pages
> directly.
>
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> ---

Sashiko mentions the same thing about freeing page tables that are still mapped
that I will ignore, and it also mentions an oddity in the PMD vmemmap handling
with get_page_bootmem() (taking 512 references whereby teardown only drops one
reference) that I will ignore, as I am ripping that part out completely either way.

--
Cheers,

David