Re: [PATCH] mm: page_alloc: make defrag_mode retries follow the promoted order
From: Andrew Morton
Date: Wed Sep 30 2026 - 16:03:12 EST
On Wed, 30 Sep 2026 13:35:01 +0100 Kiryl Shutsemau <kirill@xxxxxxxxxxxxx> wrote:
> On Tue, Sep 29, 2026 at 12:58:16PM -0700, Andrew Morton wrote:
> > On Tue, 29 Sep 2026 18:45:51 +0100 Kiryl Shutsemau <kirill@xxxxxxxxxxxxx> wrote:
> >
> > > From: "Kiryl Shutsemau (Meta)" <kas@xxxxxxxxxx>
> > >
> > > 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:
> >
> > 7e8756d7ad22 is new in 7.3-rcX, so no cc:stable needed.
>
> The commit itself has cc:stable. And it is in 6.18.50 and 7.2.4.
> The fix needs to follow it there.
doh.
> We are running 7.1 with 7e8756d7ad22 backported. We found defrag mode
> crucial if we want to use large folios in page cache.
>
> But nobody besides us seems to test it :/
>
> Can we make it default pretty please? :P
Send a patch ;)