Re: [PATCH v3 03/11] mm/mm_init: simplify zone device page initialization

From: Mike Rapoport

Date: Sun Nov 22 2026 - 10:45:18 EST


On Fri, 20 Nov 2026 18:08:48 +0800, Muchun Song <songmuchun@xxxxxxxxxxxxx> wrote:
> memmap_init_zone_device() currently seeds its reusable head and tail
> templates by fully initializing the first real struct page and copying
> it back into a stack object. This keeps the first page outside the
> common loops and leaves __init_zone_device_page() only for template
> construction.
>
> Build both templates directly from the PFN-independent state. Add the
> head-specific pgmap and refcount state to the head template and the
> compound metadata to the tail template, then initialize every page
> through zone_device_page_init_from_template().
>
> [...]

Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

--
Sincerely yours,
Mike.