Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp904120pxb; Tue, 1 Feb 2022 12:51:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLoNszRlfKN7Y+F+n0gRxBB7GknMzaD4N+T6a2u8GdIHYcY8OVsbREVvrfIlCh1YRxKkTP X-Received: by 2002:a17:903:32cb:: with SMTP id i11mr27563825plr.68.1643748661175; Tue, 01 Feb 2022 12:51:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748661; cv=none; d=google.com; s=arc-20160816; b=NmkCo1VEtQyYZSpELc5Duv4x+C979coYaF3b1bG5OCj0+nMIGYIoCnpP46ZPUQtItI noqKTacrFO7jbrrDY1/sXTjlGKy9r52a1d489/ucMJTGSSu50/Sufo5xNSu9goP+k9mm wqYrsoTZniwRn5e7bFEEQ7jipJvHjHHX5nPcQgj+q8HyJ7qVwQTIGNrZDINRRskxU3HT umYn2v1eoJhMu0iBGESx0DmO9QJuC5KUicPGtMEDNxm3vp14EuiYuNg0FaebGJAC4qcm iZSmoOxEpDcZ4slD38RMUCCvkRHfMHHVWOhxg9o/UdhQalJMJgVsZ2A4G9FLHIIe/Sa2 cqpQ== 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=NKd6R/0YNRyfzQ8ZZPjRR1HT9tn7/jzGyteVTy+hgUM=; b=D9+eM0WOd1osEM+7gE+zxGwOpfBWoh4pVKWgDPK+6izWEmz1vhfPMTuDFrDODSMQSl cf45WrqdebrmtN76A5mjPV4FRjP1AZEXghDuHC5qmzoA750/xVMQzZ1txzURSsrQGXC+ ZObehlbcCjFa+dYKrNKlrdB3bg0F3A/okwuyhH/ArDnt1fMEYIP6mKjuJx95h5pf8l68 R3SyNeTTRaFKJP5D09nPqdc+XapHcBX6eS+vAwoJMfBfXgPWpTRuS1Yo5LgG+PvNguPT VHLl0jkPPC615QEpPAV4ySNvny5I1ltk8mPn/LM7sNsuv63WEe9n35JsCtk9ukW5hDYm +o2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w9OpH9VT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 y16si18430277pfi.371.2022.02.01.12.50.49; Tue, 01 Feb 2022 12:51:01 -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=w9OpH9VT; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; 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 S1381282AbiAaVjk (ORCPT + 99 others); Mon, 31 Jan 2022 16:39:40 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:38208 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381161AbiAaViZ (ORCPT ); Mon, 31 Jan 2022 16:38:25 -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-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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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