Re: [PATCH v4 16/21] mm/mm_init: simplify deferred_free_pages() migratetype init
From: Andrew Morton
Date: Mon Jul 27 2026 - 18:54:14 EST
On Mon, 27 Jul 2026 13:08:18 +0300 Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> On Mon, Jul 27, 2026 at 11:43:31AM +0800, Muchun Song wrote:
> >
> >
> > > On Jul 27, 2026, at 11:25, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > On Sun, 26 Jul 2026 13:16:54 +0300 Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> > >
> > >> On Sat, Jul 25, 2026 at 07:21:16PM +0200, Pratyush Yadav wrote:
> > >>> From: Muchun Song <songmuchun@xxxxxxxxxxxxx>
> > >>>
> > >>> deferred_free_pages() open-codes two loops to initialize the pageblock
> > >>> migratetype for a range of pages.
> > >>>
> > >>> Replace them with pageblock_migratetype_init_range() to remove the
> > >>> duplication and make the code clearer (Note that deferred_free_pages() may
> > >>> be called from atomic context).
> > >>>
> > >>> Link: https://lore.kernel.org/20260612035903.2468601-6-songmuchun@xxxxxxxxxxxxx
> > >>> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
> > >>> Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> > >>> Acked-by: Oscar Salvador <osalvador@xxxxxxx>
> > >>> Signed-off-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>
> > >>> ---
> > >>>
> > >>> Notes:
> > >>> This patch is taken from Muchun's series [0]. The patch as of today is
> > >>> in mm-unstable.
> > >>
> > >> @Andrew,
> > >>
> > >> It looks like it'll take some time for this patch to get into mm-stable so
> > >> we can't base this work on a branch in the mm tree :(
> > >
> > > I didn't know anyone was using mm-stable :(
>
> Maybe nobody uses it because it's not really stable? ;-)
Well it's supposed to be. Rebases are rare.
The larger problem is that it doesn't contain anything until -rc5ish
because we haven't stabilized anything yet!
> > I'd like to confirm that this is a completely independent cleanup patch,
> > so it can be merged on its own.
>
> That's great, thanks for confirming!
>
> Then I think the easiest would be to take "mm/mm_init: simplify
> deferred_free_pages() migratetype init" via liveupdate tree.
No probs, I'll drop it when Mark reports the duplicate.