From: "Jiayuan Chen" <jiayuan.chen@linux.dev>
To: "Shakeel Butt" <shakeel.butt@linux.dev>,
"Michal Hocko" <mhocko@suse.com>
Cc: linux-mm@kvack.org, "Andrew Morton" <akpm@linux-foundation.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"David Hildenbrand" <david@redhat.com>,
"Qi Zheng" <zhengqi.arch@bytedance.com>,
"Lorenzo Stoakes" <lorenzo.stoakes@oracle.com>,
"Axel Rasmussen" <axelrasmussen@google.com>,
"Yuanchu Xie" <yuanchu@google.com>, "Wei Xu" <weixugc@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mm/vmscan: skip increasing kswapd_failures when reclaim was boosted
Date: Fri, 14 Nov 2025 02:23:50 +0000 [thread overview]
Message-ID: <42fca12aec282a64d3b5bd471124a1e94048afc4@linux.dev> (raw)
In-Reply-To: <jbqwxqsqvjqo664s275hcub5wgnjencvqgisiniflylp2fpxz5@imttckfazi7u>
2025/11/14 03:28, "Shakeel Butt" <shakeel.butt@linux.dev mailto:shakeel.butt@linux.dev?to=%22Shakeel%20Butt%22%20%3Cshakeel.butt%40linux.dev%3E > wrote:
>
> On Thu, Nov 13, 2025 at 11:02:41AM +0100, Michal Hocko wrote:
>
> >
> > In general I think not incrementing the failure for boosted kswapd
> > iteration is right. If this issue (high protection causing kswap
> > failures) happen on non-boosted case, I am not sure what should be right
> > behavior i.e. allocators doing direct reclaim potentially below low
> > protection or allowing kswapd to reclaim below low. For min, it is very
> > clear that direct reclaimer has to reclaim as they may have to trigger
> > oom-kill. For low protection, I am not sure.
> >
> > Our current documention gives us some room for interpretation. I am
> > wondering whether we need to change the existing implemnetation though.
> > If kswapd is not able to make progress then we surely have direct
> > reclaim happening. So I would only change this if we had examples of
> > properly/sensibly configured systems where kswapd low limit breach could
> > help to reuduce stalls (improve performance) while the end result from
> > the amount of reclaimed memory would be same/very similar.
> >
> Yes, I think any change here will need much more brainstorming and
> experimentation. There are definitely corner cases which the right
> solution might not be in kernel. One such case I was thinking about is
> unbalanced (memory) numa node where I don't think kswapd of that node
> should do anything because of the disconnect between numa memory usage
> and memcg limits. On such cases either numa balancing or
> promotion/demotion systems under discussion would be more appropriate.
> Anyways this is orthogonal.
Can I ask for a link or some keywords to search the mailing list regarding the NUMA
imbalance you mentioned?
I'm not sure if it's similar to a problem I encountered before. We have a system
with 2 nodes and swap is disabled. After running for a while, we found that anonymous
pages occupied over 99% of one node. When kswapd on that node runs, it continuously tries
to reclaim the 1% file pages. However, these file pages are mostly code pages and are hot,
leading to frenzied refaults, which eventually causes sustained high read I/O load on the disk.
next prev parent reply other threads:[~2025-11-14 2:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251024022711.382238-1-jiayuan.chen@linux.dev>
2025-10-26 4:40 ` Andrew Morton
2025-11-08 1:11 ` Shakeel Butt
2025-11-12 2:21 ` Jiayuan Chen
2025-11-13 23:41 ` Shakeel Butt
2025-11-13 10:02 ` Michal Hocko
2025-11-13 19:28 ` Shakeel Butt
2025-11-14 2:23 ` Jiayuan Chen [this message]
2025-11-13 23:47 ` Shakeel Butt
2025-11-14 4:17 ` Jiayuan Chen
2025-11-15 0:40 ` Andrew Morton
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=42fca12aec282a64d3b5bd471124a1e94048afc4@linux.dev \
--to=jiayuan.chen@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=shakeel.butt@linux.dev \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.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