From: Mike Galbraith <efault@gmx.de>
To: Alexey Avramov <hakavlad@inbox.lv>,
Mel Gorman <mgorman@techsingularity.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Vlastimil Babka <vbabka@suse.cz>,
Rik van Riel <riel@surriel.com>, Darrick Wong <djwong@kernel.org>,
regressions@lists.linux.dev,
Linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] mm: vmscan: Reduce throttling due to a failure to make progress
Date: Sun, 28 Nov 2021 11:00:59 +0100 [thread overview]
Message-ID: <252cd5acd9bf6588ec87ce02884925c737b6a8b7.camel@gmx.de> (raw)
In-Reply-To: <20211128042635.543a2d04@mail.inbox.lv>
On Sun, 2021-11-28 at 04:26 +0900, Alexey Avramov wrote:
> I will present the results of the new tests here.
>
> TLDR;
> =====
> No one Mel's patch doesn't prevent stalls in my tests.
Seems there may be a problem with the THROTTLE_WRITEBACK bits..
> $ for i in {1..10}; do tail /dev/zero; done
> -- 1. with noswap
..because the bandaid below (made of 8cd7c588 shards) on top of Mel's
last pulled that one-liner's very pointy fangs.
---
mm/backing-dev.c | 5 +++++
mm/vmscan.c | 8 +++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -1055,3 +1055,8 @@ long congestion_wait(int sync, long time
return ret;
}
EXPORT_SYMBOL(congestion_wait);
+
+int async_bdi_congested(void)
+{
+ return atomic_read(&nr_wb_congested[BLK_RW_ASYNC]) != 0;
+}
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1021,6 +1021,8 @@ static void handle_write_error(struct ad
unlock_page(page);
}
+extern int async_bdi_congested(void);
+
void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason)
{
wait_queue_head_t *wqh = &pgdat->reclaim_wait[reason];
@@ -1048,6 +1050,10 @@ void reclaim_throttle(pg_data_t *pgdat,
*/
switch(reason) {
case VMSCAN_THROTTLE_WRITEBACK:
+ if (!async_bdi_congested()) {
+ cond_resched();
+ return;
+ }
timeout = HZ/10;
if (atomic_inc_return(&pgdat->nr_writeback_throttled) == 1) {
@@ -1079,7 +1085,7 @@ void reclaim_throttle(pg_data_t *pgdat,
}
prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE);
- ret = schedule_timeout(timeout);
+ ret = io_schedule_timeout(timeout);
finish_wait(wqh, &wait);
if (reason == VMSCAN_THROTTLE_WRITEBACK)
next prev parent reply other threads:[~2021-11-28 10:01 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-25 15:18 [PATCH 1/1] mm: vmscan: Reduce throttling due to a failure to make progress Mel Gorman
2021-11-26 10:14 ` Vlastimil Babka
2021-11-26 10:26 ` Mike Galbraith
2021-11-26 16:12 ` Alexey Avramov
2021-11-26 16:52 ` Mel Gorman
2021-11-27 19:26 ` Alexey Avramov
2021-11-28 10:00 ` Mike Galbraith [this message]
2021-11-28 11:39 ` Mike Galbraith
2021-11-28 12:35 ` Mike Galbraith
2021-11-28 18:38 ` Mike Galbraith
2021-11-28 11:58 ` Alexey Avramov
2021-11-29 8:26 ` Mel Gorman
2021-11-29 15:01 ` Mel Gorman
2021-11-30 10:14 ` Mike Galbraith
2021-11-30 11:22 ` Mel Gorman
2021-11-30 12:00 ` Mike Galbraith
2021-11-30 12:51 ` Mike Galbraith
2021-11-30 13:09 ` Mel Gorman
2021-12-01 4:32 ` Mike Galbraith
2021-11-30 16:03 ` Alexey Avramov
2021-11-30 17:27 ` Mel Gorman
2021-11-30 17:59 ` Mike Galbraith
2021-12-01 13:01 ` Mel Gorman
2021-12-01 13:52 ` Mike Galbraith
2021-12-01 15:06 ` Mel Gorman
2021-11-30 18:38 ` Alexey Avramov
2021-12-01 14:00 ` Mel Gorman
2021-12-01 17:29 ` Darrick J. Wong
2021-12-02 9:43 ` Mel Gorman
2021-12-02 16:09 ` Darrick J. Wong
2021-12-02 3:11 ` Mike Galbraith
2021-12-02 10:13 ` Mel Gorman
2021-12-02 10:51 ` Mike Galbraith
2021-12-02 11:42 ` Alexey Avramov
2021-12-02 12:14 ` Alexey Avramov
2021-12-02 12:15 ` Mel Gorman
2021-12-02 12:22 ` Alexey Avramov
2021-12-02 13:18 Mel Gorman
2021-12-02 14:51 ` kernel test robot
2021-12-02 14:51 ` kernel test robot
2021-12-02 16:02 ` kernel test robot
2021-12-02 16:02 ` kernel test robot
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=252cd5acd9bf6588ec87ce02884925c737b6a8b7.camel@gmx.de \
--to=efault@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=djwong@kernel.org \
--cc=hakavlad@inbox.lv \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=regressions@lists.linux.dev \
--cc=riel@surriel.com \
--cc=vbabka@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.