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

From: Li Zhe

Date: Wed Sep 02 2026 - 22:59:47 EST


On Wed, 2 Sep 2026 07:16:12 +0300, <rppt@xxxxxxxxxx> wrote:

> > + /* Initialize the remaining head pages from template. */
> > + for (; pfn < end_pfn; pfn += pfns_per_compound) {
> > + page = pfn_to_page(pfn);
> > +
> > + zone_device_page_init_from_template(page, pfn,
> > + &template);
>
> Nit: this seems to fit into 80-chars line without wrapping.

Hi Mike,

Thanks for the review. Yes, this fits on one line.

Hi Andrew, could you please squash the following fixup into patch 3?

---
diff --git a/mm/mm_init.c b/mm/mm_init.c
index ba4148de2b28..84fe53633e44 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -1127,8 +1127,7 @@ void __ref memmap_init_zone_device(struct zone *zone,
for (; pfn < end_pfn; pfn += pfns_per_compound) {
page = pfn_to_page(pfn);

- zone_device_page_init_from_template(page, pfn,
- &template);
+ zone_device_page_init_from_template(page, pfn, &template);

if (IS_ALIGNED(pfn, PAGES_PER_SECTION))
cond_resched();
---

Thanks,
Zhe