From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Hongchen Zhang <zhanghongchen@loongson.cn>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmscan: don't scan adjust too much if current is not kswapd
Date: Thu, 15 Sep 2022 00:02:14 +0100 [thread overview]
Message-ID: <YyJdds+Tv9oiAEjd@casper.infradead.org> (raw)
In-Reply-To: <20220914155142.bf388515a39fb45bae987231@linux-foundation.org>
On Wed, Sep 14, 2022 at 03:51:42PM -0700, Andrew Morton wrote:
> On Wed, 14 Sep 2022 10:33:18 +0800 Hongchen Zhang <zhanghongchen@loongson.cn> wrote:
>
> > when a process falls into page fault and there is not enough free
> > memory,it will do direct reclaim. At the same time,it is holding
> > mmap_lock.So in case of multi-thread,it should exit from page fault
> > ASAP.
> > When reclaim memory,we do scan adjust between anon and file lru which
> > may cost too much time and trigger hung task for other thread.So for a
> > process which is not kswapd,it should just do a little scan adjust.
>
> Well, that's a pretty nasty bug. Before diving into a possible fix,
> can you please tell us more about how this happens? What sort of
> machine, what sort of workload. Can you suggest why others are not
> experiencing this?
One thing I'd like to know is whether the page fault is for an anonymous or
file-backed page. We already drop the mmap_lock for doing file I/O
(or we should ...) and maybe we also need to drop the mmap_lock for
doing direct reclaim?
next prev parent reply other threads:[~2022-09-14 23:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 2:33 [PATCH] mm/vmscan: don't scan adjust too much if current is not kswapd Hongchen Zhang
2022-09-14 22:51 ` Andrew Morton
2022-09-14 23:02 ` Matthew Wilcox [this message]
2022-09-15 1:19 ` Hongchen Zhang
2022-09-15 7:28 ` Matthew Wilcox
2022-09-15 8:02 ` Hongchen Zhang
2022-09-15 9:00 ` Matthew Wilcox
2022-09-15 9:30 ` Hongchen Zhang
2022-09-16 0:57 ` Hongchen Zhang
2022-09-16 8:40 ` Matthew Wilcox
2022-09-16 10:19 ` Hongchen Zhang
2022-09-19 23:32 ` Yosry Ahmed
2022-09-20 5:53 ` Hongchen Zhang
2022-09-20 2:23 ` Hongchen Zhang
2022-09-21 9:13 ` Mel Gorman
2022-09-21 10:14 ` Hongchen Zhang
2022-09-15 13:38 ` Feng Tang
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=YyJdds+Tv9oiAEjd@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=zhanghongchen@loongson.cn \
/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;
as well as URLs for NNTP newsgroup(s).