Re: [PATCH v2 6/6] mm/mm_init: Fix pageblock migratetype for ZONE_DEVICE compound pages

Mike Rapoport
2026-04-16T17:20:37Z

On Thu, Apr 16, 2026 at 10:06:03AM +0800, Muchun Song wrote:
>
> > On Apr 16, 2026, at 01:03, Mike Rapoport <rppt@kernel.org> wrote:
> >
> > Hi Muchun,
> >
> > On Wed, Apr 15, 2026 at 07:14:12PM +0800, Muchun Song wrote:
> >> /*
> >> * ZONE_DEVICE pages other than MEMORY_TYPE_GENERIC are released
> >> * directly to the driver page allocator which will set the page count
> >> @@ -1122,6 +1120,8 @@ void __ref memmap_init_zone_device(struct zone *zone,
> >>
> >> __init_zone_device_page(page, pfn, zone_idx, nid, pgmap);
> >>
> >> + cond_resched();
> >> +
> >
> > I don't think we want cond_resched() for every page here too, even it's a
> > compound page :)
>
> I'll update it to every PAGES_PER_SECTION, does this make sense for you?

Sounds fine.

> Thanks,
> Muchun

--
Sincerely yours,
Mike.