Received: by 2002:a05:6a10:8a4f:0:0:0:0 with SMTP id dn15csp2600830pxb; Mon, 31 Jan 2022 03:41:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDLs0caGuCPMtEXnkdcVydyAlCOO74hTGCT0qdtTO1xmO6xJdLIwrJf4M9nFULC3tO1Ukq X-Received: by 2002:a17:902:bc4a:: with SMTP id t10mr20169260plz.125.1643629260121; Mon, 31 Jan 2022 03:41:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643629260; cv=none; d=google.com; s=arc-20160816; b=xs7F/1ZEf7/RVtcXOksDh3YWGV85neLNk3pQYLLz7peZeIXpbMuQwuvemXREgf2EPM fh4m0U1c3M1Qyai+RewAIsos3tD50ILiSM2KShggbCXSuhW6JaKCzheRt3JT2wL4avaE Y94kuCiPCw8xUEACLjnycIxmpRTb2EBEN/CrPlZ3zjNKDdn9EkYYXJ9GtkA28NzXncuO lp+Uha5bAE4tw9nLgU1sjE8p8z49vKbB6oPWeXEWn4IMO1V+wGXVIL6rxKnN17dTB1A9 6e5Vch7dZu+21P6Sr9ben091nEOdNnKS9k+z8oIijjMbRLyaWG7stDpMmT4FkgANll1/ Ki7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=NLILDfYIewMcTAbJZc9mPjKMlBqDlqhTsKM2N1uM+Vw=; b=RWeOLSWldthM9s4yq+MGlg5Vgrt9reEIiKSK1bfx8bkPVvu3QRHBfCTsUjPJXFq+zI W20Qv5zsBrqH3fUAAgawn3li5GSFRXG/yAFr+kkyvr2LyYfx0YRlACEBnksJapQrLwF7 kjxArDrzCt4LdFBuk2jyyqoR18iCoRN/qZWcq/GJyLhpCX/AAPftIYQMGSsax3NsOIt6 Oq/5VZ1xt0vm9436k2qMQGmquDTA5Iz5iZULmIZSculIrPp/P8P+kID6sRNLhEgrVCtc k9qp+Umsui5vsA/zUcROV/tOqQ+RZqc9R+8hTDSny/9PPzQ23n0tNijN2Ju4uFNNova2 WjSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=taayjmIQ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=24PK3VAQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l19si14041981plg.414.2022.01.31.03.40.49; Mon, 31 Jan 2022 03:41:00 -0800 (PST) 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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=taayjmIQ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=24PK3VAQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351220AbiA1VgU (ORCPT + 99 others); Fri, 28 Jan 2022 16:36:20 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:32826 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351431AbiA1VgS (ORCPT ); Fri, 28 Jan 2022 16:36:18 -0500 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E19E31F385; Fri, 28 Jan 2022 21:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643405774; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NLILDfYIewMcTAbJZc9mPjKMlBqDlqhTsKM2N1uM+Vw=; b=taayjmIQ/dw3pRt7LXMXgV+h3N2iGR9k6iWV1POVgUTfQy7v0b53WKl6W7epBEuQeWPNId 2nS5W8Zz+JDvOI2H2O325FIcHt7vLtCdfAuhacvrf751M2nGilH84Y1DtEW6P5pWfmkFXk 3R+tAum3D39BD7myqsYNPl0uf7Iudaw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643405774; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NLILDfYIewMcTAbJZc9mPjKMlBqDlqhTsKM2N1uM+Vw=; b=24PK3VAQmVA51Rx99IGbDGj51tJod8UX27xeq8Emd3IiwsHonr+XB9p01yVh4lqGGFRKKK qudbZz9CfGjnNuAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1BAB613AA1; Fri, 28 Jan 2022 21:36:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id fu7bMcdh9GHRawAAMHmgww (envelope-from ); Fri, 28 Jan 2022 21:36:07 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Miklos Szeredi" Cc: "Andrew Morton" , "Jaegeuk Kim" , "Chao Yu" , "Jeff Layton" , "Ilya Dryomov" , "Trond Myklebust" , "Anna Schumaker" , "Ryusuke Konishi" , "Darrick J. Wong" , "Philipp Reisner" , "Lars Ellenberg" , "Paolo Valente" , "Jens Axboe" , "linux-mm" , linux-nilfs@vger.kernel.org, "Linux NFS list" , linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, "Ext4" , ceph-devel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCH 1/9] Remove inode_congested() In-reply-to: References: <164325106958.29787.4865219843242892726.stgit@noble.brown>, <164325158954.29787.7856652136298668100.stgit@noble.brown>, Date: Sat, 29 Jan 2022 08:36:02 +1100 Message-id: <164340576289.5493.5784848964540459557@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Jan 2022, Miklos Szeredi wrote: > On Thu, 27 Jan 2022 at 03:47, NeilBrown wrote: > > > > inode_congested() reports if the backing-device for the inode is > > congested. Few bdi report congestion any more, only ceph, fuse, and > > nfs. Having support just for those is unlikely to be useful. > > > > The places which test inode_congested() or it variants like > > inode_write_congested(), avoid initiating IO if congestion is present. > > We now have to rely on other places in the stack to back off, or abort > > requests - we already do for everything except these 3 filesystems. > > > > So remove inode_congested() and related functions, and remove the call > > sites, assuming that inode_congested() always returns 'false'. > > Looks to me this is going to "break" fuse; e.g. readahead path will go > ahead and try to submit more requests, even if the queue is getting > congested. In this case the readahead submission will eventually > block, which is counterproductive. > > I think we should *first* make sure all call sites are substituted > with appropriate mechanisms in the affected filesystems and as a last > step remove the superfluous bdi congestion mechanism. > > You are saying that all fs except these three already have such > mechanisms in place, right? Can you elaborate on that? Not much. I haven't looked into how other filesystems cope, I just know that they must because no other filesystem ever has a congested bdi (with one or two minor exceptions, like filesystems over drbd). Surely read-ahead should never block. If it hits congestion, the read-ahead request should simply fail. block-based filesystems seem to set REQ_RAHEAD which might get mapped to REQ_FAILFAST_MASK, though I don't know how that is ultimately used. Maybe fuse and others should continue to track 'congestion' and reject read-ahead requests when congested. Maybe also skip WB_SYNC_NONE writes.. Or maybe this doesn't really matter in practice... I wonder if we can measure the usefulness of congestion. Thanks, NeilBrown