Re: [PATCH v2 3/7] mm: add a template-based fast path for zone-device page init

From: Mike Rapoport

Date: Sat May 23 2026 - 08:12:35 EST


On Thu, 21 May 2026 12:01:20 +0800, Li Zhe <lizhe.67@xxxxxxxxxxxxx> wrote:
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index 4ba506df93bc..2992711351a0 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -1066,6 +1066,63 @@ static void __ref zone_device_page_init_slow(struct page *page,
> [ ... skip 33 lines ... ]
> + * The copied template already provides the PFN-invariant portion of a
> + * ZONE_DEVICE struct page. Fix up the fields that still depend on @pfn
> + * after the copy, namely the section bits and page->virtual when present.
> + */
> +static inline void zone_device_page_init_finish(struct page *page,
> + unsigned long pfn)

Please align the indentation for the second parameters line like int
zone_device_template_page_init() or use two tabs for indentation
everywhere.

With that fixed:

--
Sincerely yours,
Mike.