Re: [PATCH v3] mm: page_alloc: make defrag_mode retries follow the promoted order
From: Kiryl Shutsemau
Date: Mon Oct 12 2026 - 06:34:07 EST
On Sat, Oct 10, 2026 at 03:49:23PM -0700, Andrew Morton wrote:
> On Fri, 9 Oct 2026 13:55:02 +0100 "Kiryl Shutsemau (Meta)" <kas@xxxxxxxxxx> wrote:
>
> > Since commit 7e8756d7ad22 ("mm: page_alloc: fix non-movable reclaim
> > storm in defrag_mode"), direct reclaim and compaction for non-movable
> > requests under defrag_mode run at pageblock_order, to produce the whole
> > blocks that ALLOC_NOFRAGMENT needs. The retry decisions that follow
> > still use the request order. An order-0 request can therefore retry
> > indefinitely without ever reaching the ALLOC_NOFRAGMENT fallback:
> >
> > ...
> >
> > When a promoted request takes the fallback, reset the retry counters,
> > so that the fallback attempt gets a full retry budget before the OOM
> > killer is considered. A request whose reclaim was not promoted spent
> > its budget on the request itself and keeps its counters, as Usama Arif
> > pointed out.
>
> Thanks, I updated mm-unstable to this version.
>
> > v3:
> > - reset the retry counters at the fallback only for requests whose
> > reclaim was promoted; a movable request already spent its budget on
> > itself (Usama Arif)
>
> hannes's concerns/questions at
> https://lore.kernel.org/20261006081050.GA234057@xxxxxxxxxxx weren't
> fully addressed? I'll add a note and await followup.
Hm. I believe they were addressed. v2 changes are based on Harry's and
Johannes feedback.
--
Kiryl Shutsemau / Kirill A. Shutemov