[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211209095317.GL3366@techsingularity.net>
Date: Thu, 9 Dec 2021 09:53:17 +0000
From: Mel Gorman <mgorman@...hsingularity.net>
To: Hugh Dickins <hughd@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>,
Vlastimil Babka <vbabka@...e.cz>,
Alexey Avramov <hakavlad@...ox.lv>,
Rik van Riel <riel@...riel.com>,
Mike Galbraith <efault@....de>,
Darrick Wong <djwong@...nel.org>,
Shakeel Butt <shakeelb@...gle.com>,
regressions@...ts.linux.dev,
Linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/1] mm: vmscan: Reduce throttling due to a failure to
make progress
On Wed, Dec 08, 2021 at 10:20:47PM -0800, Hugh Dickins wrote:
> On Thu, 2 Dec 2021, Mel Gorman wrote:
> ...
> > --- a/mm/vmscan.c
> > +++ b/mm/vmscan.c
> ...
> > @@ -3478,14 +3520,18 @@ static void shrink_zones(struct zonelist *zonelist, struct scan_control *sc)
> > /* need some check for avoid more shrink_zone() */
> > }
> >
> > + if (!first_pgdat)
> > + first_pgdat = zone->zone_pgdat;
> > +
> > /* See comment about same check for global reclaim above */
> > if (zone->zone_pgdat == last_pgdat)
> > continue;
> > last_pgdat = zone->zone_pgdat;
> > shrink_node(zone->zone_pgdat, sc);
> > - consider_reclaim_throttle(zone->zone_pgdat, sc);
> > }
> >
> > + consider_reclaim_throttle(first_pgdat, sc);
>
> My tmpfs swapping load (tweaked to use huge pages more heavily than
> in real life) is far from being a realistic load: but it was notably
> slowed down by your throttling mods in 5.16-rc, and this patch makes
> it well again - thanks.
>
> But: it very quickly hit NULL pointer until I changed that last line to
>
> if (first_pgdat)
> consider_reclaim_throttle(first_pgdat, sc);
>
> I've given no thought as to whether that is the correct fix,
> or if first_pgdat should be set earlier in the loop above.
>
It's the right fix, first_pgdat may be NULL if compaction can run for
each zone in the zonelist which could be the case for a tmpfs swapping
load that is huge page intensive.
Thanks Hugh.
--
Mel Gorman
SUSE Labs
Powered by blists - more mailing lists