Re: [PATCH v2 1/2] mm/mm_init: factor out memmap_init_page_from_template()
From: Muchun Song
Date: Wed Nov 11 2026 - 02:59:30 EST
> On Nov 10, 2026, at 19:48, Li Zhe <lizhe.67@xxxxxxxxxxxxx> wrote:
>
> ZONE_DEVICE memmap initialization already uses a reusable struct page
> template when initializing compound tail pages. The template mostly
> contains invariant state, but a few fields still depend on the target PFN
> and must be refreshed before copying the template into each destination
> struct page.
>
> Factor that operation into memmap_init_page_from_template() so other
> boot-time memmap initialization paths can reuse the same helper.
>
> No functional change intended.
>
> Signed-off-by: Li Zhe <lizhe.67@xxxxxxxxxxxxx>
Reviewed-by: Muchun Song (ByteDance) <muchun.song@xxxxxxxxx>
Thanks.