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 5CBE3C433FE for ; Mon, 31 Jan 2022 21:38:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE3BA6B0117; Mon, 31 Jan 2022 16:38:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B93BE6B0119; Mon, 31 Jan 2022 16:38:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A34BE6B011A; Mon, 31 Jan 2022 16:38:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay029.a.hostedemail.com [64.99.140.29]) by kanga.kvack.org (Postfix) with ESMTP id 906C56B0117 for ; Mon, 31 Jan 2022 16:38:23 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 62D3160911 for ; Mon, 31 Jan 2022 21:38:23 +0000 (UTC) X-FDA: 79091896086.03.EE9D4CC Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf30.hostedemail.com (Postfix) with ESMTP id DC3F780005 for ; Mon, 31 Jan 2022 21:38:22 +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-out1.suse.de (Postfix) with ESMTPS id 4909321117; Mon, 31 Jan 2022 21:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643665101; 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=NKd6R/0YNRyfzQ8ZZPjRR1HT9tn7/jzGyteVTy+hgUM=; b=w9OpH9VTawfzJ/u8BXxgoWfymo+nzi1jLr7eZl7pa7S3H/zTZKoiY74UIkzV5oczRiR35F eLqBmYg3tZ8JK2/HDaZcngWqnQ+25s7odv9jecLpLT9NEc3dJUozM5hdxJii1lZgOzXMMQ FFGA76YJ9SMMXO+XgXy/NeWcIiKT5is= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643665101; 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=NKd6R/0YNRyfzQ8ZZPjRR1HT9tn7/jzGyteVTy+hgUM=; b=aObXzQQUXcR2oE8tQR5V9RJQ891z3ud0AVoKa2jrFRJM1SxbfNEWDptJM65WaSHMXX4Vyx 716tCFUO9nP6+iAA== 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 9A75313CCA; Mon, 31 Jan 2022 21:38:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id caHTFcZW+GGqAQAAMHmgww (envelope-from ); Mon, 31 Jan 2022 21:38:14 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "Matthew Wilcox" Cc: "Andrew Morton" , "Jeff Layton" , "Ilya Dryomov" , "Miklos Szeredi" , "Trond Myklebust" , "Anna Schumaker" , linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] nfs: remove reliance on bdi congestion In-reply-to: References: <164360127045.4233.2606812444285122570.stgit@noble.brown>, <164360183350.4233.691070075155620959.stgit@noble.brown>, , <164360492268.18996.14760090171177015570@noble.neil.brown.name>, Date: Tue, 01 Feb 2022 08:38:11 +1100 Message-id: <164366509142.18996.11029008051103064089@noble.neil.brown.name> X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: DC3F780005 X-Stat-Signature: kpzde7jsfcqab8h9e1r4udf6fixo6yk7 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=w9OpH9VT; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=aObXzQQU; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf30.hostedemail.com: domain of neilb@suse.de designates 195.135.220.28 as permitted sender) smtp.mailfrom=neilb@suse.de X-Rspam-User: nil X-HE-Tag: 1643665102-609155 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 Tue, 01 Feb 2022, Matthew Wilcox wrote: > On Mon, Jan 31, 2022 at 03:55:22PM +1100, NeilBrown wrote: > > On Mon, 31 Jan 2022, Matthew Wilcox wrote: > > > On Mon, Jan 31, 2022 at 03:03:53PM +1100, NeilBrown wrote: > > > > - .writepage to return AOP_WRITEPAGE_ACTIVATE if WB_SYNC_NONE > > > > and the flag is set. > > > > > > Is this actually useful? I ask because Dave Chinner believes > > > the call to ->writepage in vmscan to be essentially unused. > > > > He would be wrong ... unless "essentially" means "mostly" rather than > > "totally". > > swap-out to NFS results in that ->writepage call. > > For writes, SWP_FS_OPS uses ->direct_IO, not ->writepage. Confused. > I shouldn't have mentioned NFS - that is an irrelevant distraction. The "call to ->writepage in vmscan" is used, at least for swap. For swapout it is the ->writepage from swap_aops, not the ->writepage of any filesystem. This is swap_writepage(), and for SWP_FS_OPS that maps to a ->direct_IO call. Dave may well be right that the ->writepage in vmscan never calls xfs_writepage or many others. To get to the ->writepage of a filesystem it would need to be called from kswapd. You would need to have no swap configured, and 90% of memory consumed with anon pages so that the dirty_background_ratio of 10% didn't kick off writeback. Then I would expect to kswapd to write out to a filesystem before writeback would do it. Nonetheless, without clear evidence to the contrary, I think it is safest to add this test to the ->writepage function for any filesystem which currently sets the bdi async congested flag. Thanks, NeilBrown