Re: [PATCH 02/10] mm: provide free_reserved_pages(), removing x86 variant
From: Muchun Song
Date: Thu Jul 09 2026 - 02:20:51 EST
> On Jul 8, 2026, at 22:10, David Hildenbrand (Arm) <david@xxxxxxxxxx> wrote:
>
> Let's extend free_reserved_page() in page_alloc.c to free_reserved_pages(),
> dropping the custom x86 variant. The common-code variant will consume an
> order, so adjust the x86 callers accordingly.
>
> Make free_reserved_pages() assume that we are freeing ordinary
> high-order pages, just with the special "reserved" flavor. The target
> use case for now is freeing vmemmap PMD pages.
>
> Set the refcount directly to 0 (instead of 1) and call
> __free_frozen_pages(). Add some kerneldoc. Use a single
> adjust_managed_page_count() call.
>
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Reviewed-by: Muchun Song <muchun.song@xxxxxxxxx>
Thanks.