lkml.org 
[lkml]   [2021]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] mm/vmscan: Throttle reclaim until some writeback completes if congested
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

\
 
 \ /
  Last update: 2021-09-22 16:13    [W:0.166 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site