Re: [PATCH v2 4/4] mm: page_alloc: fix non-movable reclaim storm in defrag_mode

From: Vlastimil Babka (SUSE)

Date: Thu Jul 23 2026 - 10:26:56 EST


On 7/23/26 16:08, Johannes Weiner wrote:
> On Thu, Jul 23, 2026 at 12:22:58PM +0200, Vlastimil Babka (SUSE) wrote:
>> + Greg and Sasha
>>
>> On 7/23/26 01:22, Andrew Morton wrote:
>> > On Wed, 22 Jul 2026 10:56:47 -0400 Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
>> >
>> >>
>> >> Fixes: e3aa7df331bc ("mm: page_alloc: defrag_mode")
>> >> Cc: <stable@xxxxxxxxxxxxxxx>
>> >> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
>> >
>> > This cc:stable fix doesn't apply to current mainline because the
>> > preceding non-cc:stable patches get in the way.
>> >
>> > This means that the -stable maintainers will have to ask you to redo
>> > the fix to make it backportable. And you'll then be preparing a patch
>> > which hasn't had standalone testing in mainline. All very cumbersome.
>>
>> Or they backport the whole series, even if only 4/4 has a Fixes: tag.
>>
>> > So is it practical to make the fix come first, as a cc:stable hotfix so
>> > we can upstream the other patches in the next merge window?
>>
>> I think it can't come first, it's simply a complex fix that can't be done in
>> a single patch that would be reviewable. 3/4 is certainly a strict
>> dependency. I'm not sure if 2/4 as well. Perhaps 2/4 does deserve a Fixes:
>> tag and Cc: stable on its own, as it also fixes a defrag_mode deficiency.
>
> Yes. Only 1/4 could be argued away.
>
> 2/4 actually came after 4/4 during development. Without it, compaction
> cannot make sufficient forward progress on the promoted non-movable
> requests. So it is a hard functional requirement.

So that's the tricky part then. If it's a hard functional requirement for
4/4 and yet leaving it out results in no conflicts when applying 3/4 and 4/4
(as it indeed seems so, based on my local test), then it's quite possible
stable folks will figure out themselves they need 3/4 as a stable-dep-off:
4/4 but won't backport 2/4, unless you act quickly enough on their mails.

> Whether it deserves an independent Fixes: depends on how many
> GFP_KERNEL pageblock_order requests we have :-) I'm guessing not many.

I don't know how else to indicate it though. It's kind of a co-fix with 4/4?

>> > (An alternative would be to put cc:stable on all four patches. That's
>> > a bit abusive but we do it rarely).
>>
>> I don't think it's necessary, the stable team are quite capable of figuring
>> out the deps and backporting them with a Stable-dep-off: tag. IIRC the
>> "fake" tagging is discouraged? Maybe they can clarify.
>
> Yes, I *think* it should work with tagging just 4/4.
>
> It won't apply cleanly or build without 3/4. So I'd assume if that
> dependency is lost, the automated backport will bounce and I can send
> a backport series by hand.

The way I see if often happen is that Greg sends a mail that it bounced and
soon after Sasha replies with fixed up version/series. Which could very
easily be 3/4 + 4/4 without 2/4.