Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1465326pxb; Fri, 22 Oct 2021 01:13:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbhZPQRPlHv1IBAX1KghxNeOKtNfq9lq587Jv7B7ULvcood0yy+dITpy3kUMa34ITOQCP/ X-Received: by 2002:a17:90a:db53:: with SMTP id u19mr12819126pjx.234.1634890433692; Fri, 22 Oct 2021 01:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634890433; cv=none; d=google.com; s=arc-20160816; b=ZT/OHOQ/qd6k12HCzVaVaYB2P//eCzmciW3Xd2F1h97GIF6a3il3sw2nzOSlUTe6qb eDmqpeRJREcUlbF5KzZ3NrpFh7cEQv37Fte9eyjdqVt7a33dh7wh2Z5sq7UDoE1gVNPc Lp5t3YFEsoPQMWKcBM+WJpMrh6qgJRPWUodm+fFP1nyizFYNJxOmVtG68l76bv4qmKOe SyQQFebugpv8MDHSJiUYSgNNCL+6oVE1Sf7Juwm1lxksfm7JOfFM4fkgNnWg8bwmzplN L7K6OoKQ9NVizvAlelvJvqX4mMrILwTZ12V5IGeKEmgx1lR6I8iv36VdbkGUZe0z8/65 3NeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jDxhpJRgI40DEBOg44rs+KvA/WmomxlHdRuT56HsMfc=; b=0kgUpwPJ5Qkeld056liVHSc6ufJ5g54mcMsWumzrCaEEbKeQo6N9RVACtptf82kYYA mCDgmEAw6hr+W/BmYUrjP2RhIwpzpCK3o2vbCWrLIoTsoYhxDHCyfjJwtIS23lyFJED0 zz3SThO7gPOlp9hV4zpyH/wByQWwMuy5QA2103FAUqp2tjoTh5b+cSq9GVFYf6j82gnt Q0wxIDB3uQgRBXq7XUJZd6knI0cLVcSzCC5bXVtI59TqHBNGCTw2FsIsjDZn8SxZ8Pit omptPoktAJsv5C+uOpE7400ojdaeNFz3optL6grCPkW9mnQylZkUKEoa7xkQ+RBGKE3V ntNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si5683068plr.331.2021.10.22.01.13.41; Fri, 22 Oct 2021 01:13:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232415AbhJVIOY (ORCPT + 99 others); Fri, 22 Oct 2021 04:14:24 -0400 Received: from outbound-smtp02.blacknight.com ([81.17.249.8]:32904 "EHLO outbound-smtp02.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232331AbhJVIOW (ORCPT ); Fri, 22 Oct 2021 04:14:22 -0400 Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp02.blacknight.com (Postfix) with ESMTPS id 77077136035 for ; Fri, 22 Oct 2021 09:12:04 +0100 (IST) Received: (qmail 16221 invoked from network); 22 Oct 2021 08:12:04 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.29]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 22 Oct 2021 08:12:04 -0000 Date: Fri, 22 Oct 2021 09:12:02 +0100 From: Mel Gorman To: NeilBrown Cc: Andrew Morton , Theodore Ts'o , Andreas Dilger , "Darrick J . Wong" , Matthew Wilcox , Michal Hocko , Dave Chinner , Rik van Riel , Vlastimil Babka , Johannes Weiner , Jonathan Corbet , Linux-MM , Linux-fsdevel , LKML Subject: Re: [PATCH 6/8] mm/vmscan: Centralise timeout values for reclaim_throttle Message-ID: <20211022081202.GG3959@techsingularity.net> References: <20211019090108.25501-1-mgorman@techsingularity.net> <20211019090108.25501-7-mgorman@techsingularity.net> <163486477387.17149.7808824931340167601@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <163486477387.17149.7808824931340167601@noble.neil.brown.name> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 22, 2021 at 12:06:13PM +1100, NeilBrown wrote: > On Tue, 19 Oct 2021, Mel Gorman wrote: > ... > > + switch(reason) { > > + case VMSCAN_THROTTLE_NOPROGRESS: > > + case VMSCAN_THROTTLE_WRITEBACK: > > + timeout = HZ/10; > > + > > + if (atomic_inc_return(&pgdat->nr_writeback_throttled) == 1) { > > + WRITE_ONCE(pgdat->nr_reclaim_start, > > + node_page_state(pgdat, NR_THROTTLED_WRITTEN)); > > You have introduced a behaviour change that wasn't flagged in the commit > message. > Previously nr_writeback_throttled was only incremented for > VMSCAN_THROTTLE_WRITEBACK, now it is incremented for > VMSCAN_THROTTLE_NOPROGRESS as well. > > Some justification would be good. > This is the result of rebase near the end of a day going sideways. There is no justification, it's just wrong. I'm rerunning the entire series, will update the leader and resend the series. --8<-- mm/vmscan: Centralise timeout values for reclaim_throttle -fix Neil Brown spotted the fallthrough-logic for reclaim_throttle was wrong -- only VMSCAN_THROTTLE_WRITEBACK affects pgdat->nr_writeback_throttled. This was the result of a rebase going sideways and only happens to sometimes work by co-incidence. This is a fix to the mmotm patch mm-vmscan-centralise-timeout-values-for-reclaim_throttle.patch Signed-off-by: Mel Gorman --- mm/vmscan.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 1f5c467dc83c..64c38979b7df 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1032,7 +1032,6 @@ void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason) * of the inactive LRU. */ switch(reason) { - case VMSCAN_THROTTLE_NOPROGRESS: case VMSCAN_THROTTLE_WRITEBACK: timeout = HZ/10; @@ -1041,6 +1040,9 @@ void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason) node_page_state(pgdat, NR_THROTTLED_WRITTEN)); } + break; + case VMSCAN_THROTTLE_NOPROGRESS: + timeout = HZ/10; break; case VMSCAN_THROTTLE_ISOLATED: timeout = HZ/50; @@ -1055,7 +1057,7 @@ void reclaim_throttle(pg_data_t *pgdat, enum vmscan_throttle_state reason) ret = schedule_timeout(timeout); finish_wait(wqh, &wait); - if (reason == VMSCAN_THROTTLE_ISOLATED) + if (reason == VMSCAN_THROTTLE_WRITEBACK) atomic_dec(&pgdat->nr_writeback_throttled); trace_mm_vmscan_throttled(pgdat->node_id, jiffies_to_usecs(timeout),