Re: [PATCH] mm/page_alloc: Clarify some migratetype fallback code

Johannes Weiner
2025-02-21T17:33:06Z

On Fri, Feb 21, 2025 at 06:24:45PM +0100, Brendan Jackman wrote:
> On Tue, 18 Feb 2025 at 21:38, Johannes Weiner <hannes@cmpxchg.org> wrote:
> >
> > @@ -1930,7 +1929,7 @@ steal_suitable_fallback(struct zone *zone, struct page *page,
> /*
> * This can happen due to races and we want to prevent broken
> * highatomic accounting.
> */
> > if (is_migrate_highatomic(block_type))
> > - goto single_page;
> > + return NULL;
>
> Side question: when does this happen? Might have a spooky gap in my
> understanding here as I thought the only reason the pageblock typed
> was changed without the zone lock held was during memory hotplug.

Good job catching that. I don't think they are needed anymore after
the hygiene patches. I had proposed removing them as a follow-up, but
never got around to it:

https://lore.kernel.org/linux-mm/20230912150320.GB3228@cmpxchg.org/

I'll send a proper patch.