Re: [PATCH v2 01/14] mm/mm_init: factor out memmap_init_page_from_template()

From: Lance Yang

Date: Sun Nov 15 2026 - 23:40:49 EST



On Fri, Nov 13, 2026 at 11:34:29AM +0800, Muchun Song wrote:
>From: Li Zhe <lizhe.67@xxxxxxxxxxxxx>
>
>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>
>Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
>---

Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>