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 2DF45C433EF for ; Fri, 28 Jan 2022 21:36:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 53F5C6B00F4; Fri, 28 Jan 2022 16:36:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4EF046B00F6; Fri, 28 Jan 2022 16:36:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 390786B00F7; Fri, 28 Jan 2022 16:36:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0158.hostedemail.com [216.40.44.158]) by kanga.kvack.org (Postfix) with ESMTP id 275406B00F4 for ; Fri, 28 Jan 2022 16:36:17 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E01CC181E7272 for ; Fri, 28 Jan 2022 21:36:16 +0000 (UTC) X-FDA: 79081004352.13.CAE8223 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf31.hostedemail.com (Postfix) with ESMTP id 355A320037 for ; Fri, 28 Jan 2022 21:36:16 +0000 (UTC) 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> X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 355A320037 X-Stat-Signature: g6djam9y6f51ykqkjocmgsdbn99xzb9c Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=taayjmIQ; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=24PK3VAQ; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf31.hostedemail.com: domain of neilb@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=neilb@suse.de X-Rspam-User: nil X-HE-Tag: 1643405776-160633 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 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