From: Andrew Morton <akpm@linux-foundation.org>
To: john <love_goo@163.com>
Cc: liuye@kylinos.cn, hannes@cmpxchg.org, mhocko@kernel.org,
david@kernel.org, ljs@kernel.org, hughd@google.com,
mgorman@techsingularity.net, yang@os.amperecomputing.com,
zhangqiuhao@huawei.com, wangkefeng.wang@huawei.com,
mawupeng1@huwei.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Wupeng Ma <mawupeng1@huawei.com>
Subject: Re: [PATCH resend 0/2] mm: vmscan: fix scan overshoot and ineligible folio scanning
Date: Tue, 8 Sep 2026 19:11:01 -0700 [thread overview]
Message-ID: <20260908191101.b6e5a5a52cb8efe8f3883a81@linux-foundation.org> (raw)
In-Reply-To: <20260901084706.3784449-1-love_goo@163.com>
On Tue, 1 Sep 2026 16:47:04 +0800 john <love_goo@163.com> wrote:
> From: Wupeng Ma <mawupeng1@huawei.com>
>
> Rebase to the latest v7.3-rc-1.
>
> These problems only surface when reclaim targets a lower zone
> while the LRU holds folios from a higher zone. Normal userspace
> allocations go to the highest zone. The zone-skip branch stays
> dead under typical loads. Lower-zone-pressured configs (DMA32
> module allocations, memory-constrained devices) hit the issues.
> They inflate scan cost and delay the OOM.
>
> shrink_lruvec() drives reclaim in SWAP_CLUSTER_MAX (32) chunks, but
> isolate_lru_folios() may scan far more than that per call on a single
> LRU. The excess is never charged back, so shrink_lruvec() keeps
> rescanning the same folios round after round. When reclaim targets a
> lower zone, the same scanner also keeps walking zone-ineligible folios
> that can never satisfy the allocation, inflating nr_reclaimed into a
> false progress that delays the OOM.
>
> This series fixes both:
>
> [1/2] Charge the isolate overshoot against the scan quota so the
> next round skips already-scanned folios.
> [2/2] Stop scanning once too many zone-ineligible folios have been
> skipped, instead of force-isolating them.
>
> Background
> ==========
>
> We observed slow, unexpected OOM behavior during extreme stress testing,
OK. But why should we care? Don't do extreme stress testing on your
revenue-generating customer-facing computers!
IOW, as long as the stress tests don't crash the kernel or lock up the
box, we can spend our time thinking about kernel behavior which really
matters.
Now, if these changes can be shown to translate into improvement in
real-world workloads then they're useful.
Am I wrong?
prev parent reply other threads:[~2026-09-09 2:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 8:47 john
2026-09-01 8:47 ` [PATCH resend 1/2] mm: vmscan: charge isolate overshoot against scan quota john
2026-09-09 9:52 ` Kunwu Chan
2026-09-01 8:47 ` [PATCH resend 2/2] mm: vmscan: stop scanning ineligible folios after max_nr_skipped john
2026-09-09 9:56 ` Kunwu Chan
2026-09-08 1:49 ` [PATCH resend 0/2] mm: vmscan: fix scan overshoot and ineligible folio scanning john
2026-09-09 2:11 ` Andrew Morton [this message]
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=20260908191101.b6e5a5a52cb8efe8f3883a81@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuye@kylinos.cn \
--cc=ljs@kernel.org \
--cc=love_goo@163.com \
--cc=mawupeng1@huawei.com \
--cc=mawupeng1@huwei.com \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=wangkefeng.wang@huawei.com \
--cc=yang@os.amperecomputing.com \
--cc=zhangqiuhao@huawei.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
all inboxes | Powered by JetHome®