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 1560BC433EF for ; Mon, 13 Dec 2021 05:51:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B3266B0071; Mon, 13 Dec 2021 00:50:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 33B7C6B0073; Mon, 13 Dec 2021 00:50:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1DC406B0074; Mon, 13 Dec 2021 00:50:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id 0BB196B0071 for ; Mon, 13 Dec 2021 00:50:55 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B5468876EA for ; Mon, 13 Dec 2021 05:50:44 +0000 (UTC) X-FDA: 78911696808.19.3C540B9 Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by imf19.hostedemail.com (Postfix) with ESMTP id D6D1B1A000B for ; Mon, 13 Dec 2021 05:50:43 +0000 (UTC) Received: from dread.disaster.area (pa49-181-243-119.pa.nsw.optusnet.com.au [49.181.243.119]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 8243C58B7A0; Mon, 13 Dec 2021 16:50:40 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1mwdYm-002S6K-Gx; Mon, 13 Dec 2021 16:07:36 +1100 Date: Mon, 13 Dec 2021 16:07:36 +1100 From: Dave Chinner To: NeilBrown 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 Message-ID: <20211213050736.GS449541@dread.disaster.area> References: <163936868317.23860.5037433897004720387.stgit@noble.brown> <163936886727.23860.5245364396572576756.stgit@noble.brown> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <163936886727.23860.5245364396572576756.stgit@noble.brown> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=61b6df32 a=BEa52nrBdFykVEm6RU8P4g==:117 a=BEa52nrBdFykVEm6RU8P4g==:17 a=kj9zAlcOel0A:10 a=IOMw9HtfNCkA:10 a=7-415B0cAAAA:8 a=HeSqFrNRAXltMStoDEkA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: D6D1B1A000B X-Stat-Signature: u59paj6hijm1tpc5axu9ihpdqzi1t71a Authentication-Results: imf19.hostedemail.com; dkim=none; dmarc=none; spf=none (imf19.hostedemail.com: domain of david@fromorbit.com has no SPF policy when checking 211.29.132.59) smtp.mailfrom=david@fromorbit.com X-HE-Tag: 1639374643-314214 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, 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? Cheers, Dave. -- Dave Chinner david@fromorbit.com