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 2418CC433F5 for ; Mon, 13 Dec 2021 07:04:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3AEFC6B0074; Mon, 13 Dec 2021 02:04:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 35DDB6B0075; Mon, 13 Dec 2021 02:04:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 225DE6B0078; Mon, 13 Dec 2021 02:04:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id 10DCF6B0074 for ; Mon, 13 Dec 2021 02:04:30 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BF24618046C41 for ; Mon, 13 Dec 2021 07:04:19 +0000 (UTC) X-FDA: 78911882238.23.9B4B620 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf13.hostedemail.com (Postfix) with ESMTP id 9177120002 for ; Mon, 13 Dec 2021 07:04: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 D09C81F3B0; Mon, 13 Dec 2021 07:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1639379057; 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=aEqBV9gaFo2wyx1G4xG19C/0b13L1C/hoEvYE9B85GE=; b=l/hLlA5w3OBwKRP+sBt/ehoVB3EoaTuRtFJa9WBwUg8DKSN0+dWtXmPaULZ5nea0glf+3i /y099EP4z9wGokt1s7ezqdFqw780FOZu/+ajH8HFYxpYwantjdLh91yQrYkA6XOijRd/n1 sLfk1JR2eSud6NM0G4BZ3LPOJ7i0/y8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1639379057; 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=aEqBV9gaFo2wyx1G4xG19C/0b13L1C/hoEvYE9B85GE=; b=fbIFNrfIGETnM5AYz2WyO2gy+fZNb61dtNZ2rejU57HQMud9rQbH2LfXezo8Za7bUX9l4C gqceDp2a6mOOzNCw== 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 A220013B51; Mon, 13 Dec 2021 07:04:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 0YQoF23wtmFUaQAAMHmgww (envelope-from ); Mon, 13 Dec 2021 07:04:13 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Dave Chinner" Cc: "Andrew Morton" , "Mel Gorman" , "Philipp Reisner" , "Lars Ellenberg" , "Jan Kara" , "Ryusuke Konishi" , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] Remove bdi_congested() and wb_congested() and related functions In-reply-to: <20211213050736.GS449541@dread.disaster.area> References: <163936868317.23860.5037433897004720387.stgit@noble.brown>, <163936886727.23860.5245364396572576756.stgit@noble.brown>, <20211213050736.GS449541@dread.disaster.area> Date: Mon, 13 Dec 2021 18:04:10 +1100 Message-id: <163937905049.22433.10716750573737410875@noble.neil.brown.name> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 9177120002 X-Stat-Signature: 4x9cff6459eaz64otn9yxeydpzsc8o3x Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="l/hLlA5w"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fbIFNrfI; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf13.hostedemail.com: domain of neilb@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=neilb@suse.de X-HE-Tag: 1639379056-861025 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 Mon, 13 Dec 2021, Dave Chinner wrote: > On Mon, Dec 13, 2021 at 03:14:27PM +1100, NeilBrown wrote: > > These functions are no longer useful as the only bdis that report > > congestion are in ceph, fuse, and nfs. None of those bdis can be the > > target of the calls in drbd, ext2, nilfs2, or xfs. > > > > Removing the test on bdi_write_contested() in current_may_throttle() > > could cause a small change in behaviour, but only when PF_LOCAL_THROTTLE > > is set. > > > > So replace the calls by 'false' and simplify the code - and remove the > > functions. > > > > Signed-off-by: NeilBrown > .... > > diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c > > index 631c5a61d89b..22f73b3e888e 100644 > > --- a/fs/xfs/xfs_buf.c > > +++ b/fs/xfs/xfs_buf.c > > @@ -843,9 +843,6 @@ xfs_buf_readahead_map( > > { > > struct xfs_buf *bp; > > > > - if (bdi_read_congested(target->bt_bdev->bd_disk->bdi)) > > - return; > > Ok, but this isn't a "throttle writeback" test here - it's trying to > avoid having speculative readahead blocking on a full request queue > instead of just skipping the readahead IO. i.e. prevent readahead > thrashing and/or adding unnecessary read load when we already have a > full read queue... > > So what is the replacement for that? We want to skip the entire > buffer lookup/setup/read overhead if we're likely to block on IO > submission - is there anything we can use to do this these days? I don't think there is a concept of a "full read queue" any more. There are things that can block an IO submission though. There is allocation of the bio from a mempool, and there is rq_qos_throttle, and there are probably other places where submission can block. I don't think you can tell in advance if a submission is likely to block. I think the idea is that the top level of the submission stack should rate-limit based on the estimated throughput of the stack. I think write-back does this. I don't know about read-ahead. NeilBrown