From: "Kiryl Shutsemau (Meta)" <kas@kernel.org>
To: Harry Yoo <harry@kernel.org>
Cc: sashiko-reviews@lists.linux.dev,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
David Hildenbrand <david@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <brendan.jackman@linux.dev>,
Zi Yan <ziy@nvidia.com>, Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Mike Rapoport <rppt@kernel.org>, Qi Zheng <qi.zheng@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Kairui Song <kasong@tencent.com>, Barry Song <baohua@kernel.org>,
Axel Rasmussen <axelrasmussen@google.com>,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
Baoquan He <baoquan.he@linux.dev>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Dev Jain <dev.jain@arm.com>, Usama Arif <usama.arif@linux.dev>,
linux-mm@kvack.org, kernel-team@meta.com
Subject: Re: [PATCH v3 2/3] mm: page_alloc: make the high-order watermark check honour ALLOC_NOFRAGMENT
Date: Thu, 3 Dec 2026 14:32:35 -0800 [thread overview]
Message-ID: <axHtJTlj0WDyXYf_@shutemov.name> (raw)
In-Reply-To: <awh3A3CIwxL5v-1K@thinkstation>
On Thu, Nov 26, 2026 at 06:39:42PM +0000, Harry Yoo wrote:
> On Thu, Nov 19, 2026 at 02:25:10PM +0000, Kiryl Shutsemau (Meta) wrote:
> > On Tue, Nov 17, 2026 at 12:51:34PM +0000, sashiko-bot@kernel.org wrote:
> > > Thank you for your contribution! Sashiko AI review found 1 potential
> > > issue to consider:
> > > - [Medium] mm: page_alloc: should_reclaim_retry() counts unusable
> > > migratetype pages
> >
> > Not a regression. should_reclaim_retry() never filtered by migratetype.
>
> ... actually I had the same question as Sashiko. It's not a regression
> introduced by this patch, but we might still need to fix it?
>
> Looking at the hunk I was going to ask "what guarantees that
> should_reclaim_retry() doesn't keep returning true when it should not",
> otherwise seems like a similiar issue fixed by commit 4cd78a2dcfb ("mm:
> page_alloc: make defrag_mode retries follow the promoted order")?
It keeps returning true only while reclaim frees something, as for any
non-costly request.
At order 1-3 that is real progress: reclaim backs off for
compaction_ready() only above PAGE_ALLOC_COSTLY_ORDER, and that back-off
is what reported progress with nothing freed before 4cd78a2dcfb. These
requests are movable, so what reclaim frees is in blocks they can use.
What they miss is compaction priority escalation: should_compact_retry()
is not reached while should_reclaim_retry() says yes. That is the same
without defrag_mode.
Filtering by migratetype there would make them fall back while reclaim
still makes progress. defrag_mode is meant to run reclaim and compaction
in full before falling back, and to fall back only to avoid OOM.
--
Kiryl Shutsemau / Kirill A. Shutemov
next prev parent reply other threads:[~2026-12-03 22:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 12:50 [PATCH v3 0/3] mm: make watermark checks honour ALLOC_NOFRAGMENT Kiryl Shutsemau (Meta)
2026-11-16 12:50 ` [PATCH v3 1/3] mm: page_alloc: add a watermark check that knows the migratetype Kiryl Shutsemau (Meta)
2026-11-16 12:51 ` [PATCH v3 2/3] mm: page_alloc: make the high-order watermark check honour ALLOC_NOFRAGMENT Kiryl Shutsemau (Meta)
2026-11-17 12:51 ` sashiko-bot
2026-11-19 14:25 ` Kiryl Shutsemau (Meta)
2026-11-26 18:39 ` Harry Yoo
2026-12-03 22:32 ` Kiryl Shutsemau (Meta) [this message]
2026-11-18 8:10 ` Dev Jain
2026-11-19 14:02 ` Kiryl Shutsemau (Meta)
2026-11-23 9:49 ` Vlastimil Babka (SUSE)
2026-11-23 10:41 ` Dev Jain
2026-11-23 14:55 ` Kiryl Shutsemau (Meta)
2026-11-25 8:25 ` Dev Jain
2026-11-16 12:51 ` [PATCH v3 3/3] mm: vmscan: tell direct reclaim the allocation is ALLOC_NOFRAGMENT Kiryl Shutsemau (Meta)
2026-11-23 9:48 ` [PATCH v3 0/3] mm: make watermark checks honour ALLOC_NOFRAGMENT Vlastimil Babka (SUSE)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=axHtJTlj0WDyXYf_@shutemov.name \
--to=kas@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=baoquan.he@linux.dev \
--cc=brendan.jackman@linux.dev \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=hannes@cmpxchg.org \
--cc=harry@kernel.org \
--cc=kasong@tencent.com \
--cc=kernel-team@meta.com \
--cc=liam@infradead.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=qi.zheng@linux.dev \
--cc=rppt@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=usama.arif@linux.dev \
--cc=vbabka@kernel.org \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox