Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1483074pxb; Fri, 22 Oct 2021 01:40:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMPoUcuIw8929VHzuRhXeKpQDCWhs3rJB9tzvsBR+WK5Gh06N+kfuo9TaTP1Uq3VzMte8q X-Received: by 2002:a17:902:c94f:b0:13f:4b5:cddd with SMTP id i15-20020a170902c94f00b0013f04b5cdddmr9949925pla.58.1634892046396; Fri, 22 Oct 2021 01:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634892046; cv=none; d=google.com; s=arc-20160816; b=PJvse57uIuU39FHKI+qkAzmkN4yUYz1p8vCfmCCTonKDi13EXC5LU9VqxN87iZ3sEk BpjcynnBT11yLL64LIXmQ6XRwtr4GECArhaoOHiqkZqsYm6gQuplLq5mvCxTigPLALaK soscj2ulc5oayyufZpAoBZhlCXDxyIORiPEfnvKLQgP1bzvvC97QDYdDskC+8jtBC4mH j6Cy29c5/OZpd5v0Awt0dcnI+ncKJkDAi+MYr1R2qXOTnYxWiSsKxQHOi4d0QtByKujZ ENEu/czp393YTPW0waHG9a6c+KV+kmrBgqOwc/rqfGOpm21qtFRHzggSY2/VgbVnoDBs RahQ== 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=0vpKdenogBFv2emDlRPcxAtV1JlL6x08wmI7hbTceTs=; b=agOAaZc+XYdAbm5CK+ojxswbqV+Dymz0akueOq1OQLAB8NY4nPzwQg7N1POuinjMr7 a01ElVuY/o5dAaam74Uw7M9LVqn3s7stwmhtIWcRdUkuomJIWrcv67oPb/F+/68di2UW KKXlEoaKKmc1lDV+IbydgtV1FEfS+K60/Iqi7MPtFNQLvHKnMSImmVNpv97jKJ9PfY6O reXlMCvAa3xVYv52EXcbD0TNADy89eBiPxevOMCE0l9qJjvWrXNyLEbt0RDpp8EF0V60 /TIQhAxx63WmagR8KqdIXMBFBtXBJNjNlXy1LNJKtPGK1bbCc1o2rDT/Mzw0HUsSuWIG N7sA== 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 e3si10323047pgv.129.2021.10.22.01.40.33; Fri, 22 Oct 2021 01:40:46 -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 S232249AbhJVIlv (ORCPT + 99 others); Fri, 22 Oct 2021 04:41:51 -0400 Received: from outbound-smtp15.blacknight.com ([46.22.139.232]:60359 "EHLO outbound-smtp15.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232192AbhJVIlr (ORCPT ); Fri, 22 Oct 2021 04:41:47 -0400 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp15.blacknight.com (Postfix) with ESMTPS id 5E6371C47B2 for ; Fri, 22 Oct 2021 09:39:29 +0100 (IST) Received: (qmail 28203 invoked from network); 22 Oct 2021 08:39:29 -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:39:29 -0000 Date: Fri, 22 Oct 2021 09:39:27 +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 v4 0/8] Remove dependency on congestion_wait in mm/ Message-ID: <20211022083927.GI3959@techsingularity.net> References: <20211019090108.25501-1-mgorman@techsingularity.net> <163486531001.17149.13533181049212473096@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <163486531001.17149.13533181049212473096@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:15:10PM +1100, NeilBrown wrote: > On Tue, 19 Oct 2021, Mel Gorman wrote: > > Changelog since v3 > > o Count writeback completions for NR_THROTTLED_WRITTEN only > > o Use IRQ-safe inc_node_page_state > > o Remove redundant throttling > > > > This series is also available at > > > > git://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git mm-reclaimcongest-v4r2 > > > > This series that removes all calls to congestion_wait > > in mm/ and deletes wait_iff_congested. > > Thanks for this. > I don't have sufficient expertise for a positive review, but it seems to > make sense with one exception which I have commented on separately. > A test battering NFS would still be nice! > In general, I still don't like the use of wake_up_all(), though it won't > cause incorrect behaviour. > Removing wake_up_all would be tricky. Ideally it would be prioritised but more importantly, some sort of guarantee should exist that enough wakeup events trigger to wake tasks before the timeout. That would need careful thinking about each reclaim reason. For example, if N tasks throttle on NOPROGRESS, there is no guarantee that N tasks are currently in reclaim that would wake each sleeping task as progress is made. It's similar for writeback, are enough pages under writeback to trigger each wakeup? A more subtle issue is if each reason should be strict if waking tasks one at a time. For example, a task sleeping on writeback might make progress for other reasons such as the working set changing during reclaim or a large task exiting. Of course the same concerns exist for the series as it stands but the worst case scenarios are mitigated by wake_up_all. > I would prefer the first patch would: > - define NR_VMSCAN_THROTTLE > - make reclaim_wait an array > - spelled nr_reclaim_throttled as nr_writeback_throttled > > rather than leaving those changes for the second patch. I think that > would make review easier. > I can do this. Normally I try structure series from least-to-most controversial so that it can be cut at any point and still make sense so the array was defined in the second patch because that's when it is required. However, I already had defined the enum in patch 1 for the tracepoint so I might as well make it an array too. -- Mel Gorman SUSE Labs