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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85618C433F5 for ; Thu, 9 Dec 2021 09:53:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22BCE6B0071; Thu, 9 Dec 2021 04:53:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1DC616B0073; Thu, 9 Dec 2021 04:53:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0CB696B0074; Thu, 9 Dec 2021 04:53:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0087.hostedemail.com [216.40.44.87]) by kanga.kvack.org (Postfix) with ESMTP id 0061B6B0071 for ; Thu, 9 Dec 2021 04:53:32 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B15FA8A9B3 for ; Thu, 9 Dec 2021 09:53:22 +0000 (UTC) X-FDA: 78897793044.25.A8021C0 Received: from outbound-smtp01.blacknight.com (outbound-smtp01.blacknight.com [81.17.249.7]) by imf11.hostedemail.com (Postfix) with ESMTP id 9452A40005 for ; Thu, 9 Dec 2021 09:53:20 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp01.blacknight.com (Postfix) with ESMTPS id 446A5C4A6B 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) X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 9452A40005 X-Stat-Signature: 8gz5k89itjnz9nm4ri89tjiptre75xnf Authentication-Results: imf11.hostedemail.com; dkim=none; spf=pass (imf11.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.7 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-HE-Tag: 1639043600-529913 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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