From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FAC7C433FE for ; Thu, 9 Dec 2021 09:53:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229924AbhLIJ44 (ORCPT ); Thu, 9 Dec 2021 04:56:56 -0500 Received: from outbound-smtp43.blacknight.com ([46.22.139.229]:56515 "EHLO outbound-smtp43.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231511AbhLIJ4y (ORCPT ); Thu, 9 Dec 2021 04:56:54 -0500 Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp43.blacknight.com (Postfix) with ESMTPS id 591D61BB4 for ; Thu, 9 Dec 2021 09:53:20 +0000 (GMT) Received: (qmail 22147 invoked from network); 9 Dec 2021 09:53:20 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.197.169]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 9 Dec 2021 09:53:19 -0000 Date: Thu, 9 Dec 2021 09:53:17 +0000 From: Mel Gorman To: Hugh Dickins Cc: Andrew Morton , Michal Hocko , Vlastimil Babka , Alexey Avramov , Rik van Riel , Mike Galbraith , Darrick Wong , Shakeel Butt , regressions@lists.linux.dev, Linux-fsdevel , Linux-MM , LKML Subject: Re: [PATCH v4 1/1] mm: vmscan: Reduce throttling due to a failure to make progress Message-ID: <20211209095317.GL3366@techsingularity.net> References: <20211202150614.22440-1-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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