From: Mel Gorman <mgorman@techsingularity.net>
To: Hillf Danton <hdanton@sina.com>
Cc: Linux-MM <linux-mm@kvack.org>, NeilBrown <neilb@suse.de>,
Dave Chinner <david@fromorbit.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] mm/vmscan: Throttle reclaim until some writeback completes if congested
Date: Wed, 22 Sep 2021 15:13:01 +0100 [thread overview]
Message-ID: <20210922141301.GZ3959@techsingularity.net> (raw)
In-Reply-To: <20210922121620.4716-1-hdanton@sina.com>
On Wed, Sep 22, 2021 at 08:16:20PM +0800, Hillf Danton wrote:
> On Mon, 20 Sep 2021 09:54:32 +0100 Mel Gorman wrote:
> > +static void
> > +reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason,
> > + long timeout)
> > +{
> > + wait_queue_head_t *wqh =3D &pgdat->reclaim_wait;
> > + unsigned long start =3D jiffies;
> > + long ret;
> > + DEFINE_WAIT(wait);
> > +
> > + atomic_inc(&pgdat->nr_reclaim_throttled);
> > + WRITE_ONCE(pgdat->nr_reclaim_start,
> > + node_page_state(pgdat, NR_THROTTLED_WRITTEN));
>
> Missing wakeup could happen if the current sleeper overwrites
> pgdat->nr_reclaim_start set by the existing sleeper.
>
> if (1 == atomic_inc_and_return(&pgdat->nr_reclaim_throttled))
> WRITE_ONCE(pgdat->nr_reclaim_start,
> node_page_state(pgdat, NR_THROTTLED_WRITTEN));
>
Good spot, will fix.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2021-09-22 14:13 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 8:54 [RFC PATCH 0/5] Remove dependency on congestion_wait in mm/ Mel Gorman
2021-09-20 8:54 ` [PATCH 1/5] mm/vmscan: Throttle reclaim until some writeback completes if congested Mel Gorman
2021-09-20 23:19 ` NeilBrown
2021-09-21 11:12 ` Mel Gorman
2021-09-21 21:27 ` NeilBrown
2021-09-21 0:13 ` NeilBrown
2021-09-21 10:58 ` Mel Gorman
2021-09-21 21:40 ` NeilBrown
2021-09-22 6:04 ` Dave Chinner
2021-09-22 8:03 ` Mel Gorman
2021-09-20 8:54 ` [PATCH 2/5] mm/vmscan: Throttle reclaim and compaction when too may pages are isolated Mel Gorman
2021-09-20 23:27 ` NeilBrown
2021-09-21 11:03 ` Mel Gorman
2021-09-21 18:45 ` Yang Shi
2021-09-22 8:11 ` Mel Gorman
2021-09-20 8:54 ` [PATCH 3/5] mm/vmscan: Throttle reclaim when no progress is being made Mel Gorman
2021-09-20 23:31 ` NeilBrown
2021-09-21 11:16 ` Mel Gorman
2021-09-21 21:46 ` NeilBrown
2021-09-22 9:21 ` Mel Gorman
2021-09-20 8:54 ` [PATCH 4/5] mm/writeback: Throttle based on page writeback instead of congestion Mel Gorman
2021-09-20 8:54 ` [PATCH 5/5] mm/page_alloc: Remove the throttling logic from the page allocator Mel Gorman
2021-09-20 11:42 ` [RFC PATCH 0/5] Remove dependency on congestion_wait in mm/ Matthew Wilcox
2021-09-20 12:50 ` Mel Gorman
2021-09-20 14:11 ` David Sterba
2021-09-21 11:18 ` Mel Gorman
2021-09-20 19:51 ` Mel Gorman
2021-09-21 20:46 ` Dave Chinner
2021-09-22 17:52 ` Mel Gorman
[not found] ` <20210922121620.4716-1-hdanton@sina.com>
2021-09-22 14:13 ` Mel Gorman [this message]
2021-09-29 10:09 [PATCH 0/5] Remove dependency on congestion_wait in mm/ v2 Mel Gorman
2021-09-29 10:09 ` [PATCH 1/5] mm/vmscan: Throttle reclaim until some writeback completes if congested Mel Gorman
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=20210922141301.GZ3959@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=david@fromorbit.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=neilb@suse.de \
/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).