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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CF4FC433F5 for ; Fri, 22 Oct 2021 08:12:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 251B761056 for ; Fri, 22 Oct 2021 08:12:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232430AbhJVIOZ (ORCPT ); Fri, 22 Oct 2021 04:14:25 -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),