Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp894809pxb; Tue, 1 Feb 2022 12:39:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo1ueYjbzSJJgq9+kWEW9p/G1MXbkpdwuSUHDFAZEt4KVs3H7rNEZ9+jjAtLmPqts6+G+B X-Received: by 2002:a17:902:d2c6:: with SMTP id n6mr27761097plc.125.1643747941942; Tue, 01 Feb 2022 12:39:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643747941; cv=none; d=google.com; s=arc-20160816; b=U3DmwenJlhBe2hrHSI3qvaQIPLCkmq0yppKddROUWfW/hGrHdi/iSQCtFqDMaBeWb8 s8BLBGLhBYZbMo4XZjNKKvKdZ4cXKKEY9kEpjJOzkJVTsynadikEqHH318BBGGaztcCT yzdCxv614LT95LvKdQD7QZu+nQz1qt37k6ZN/Gga8ptEPJVXbF7embF+iBfDph0aBDWJ y/c8xU2dpu9vfKWIJbkNWuNdrD8ZAX+S7/Ogz3nPun6ffgYKmVkInO1FTBn4/yZL3nNv KTT2m8MM9TfQ8PnTZCggTGmqgiXMihdQeCvhvQKR+S0DBfMeXJgRGNeBrpzjsQUPlxzW pdFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ga26PmbdXqYDqvVXaK1iI74r5/HqT8MBfA8idE9wScU=; b=pRgK1TN0WLehHL0cIodzc84iJpZvhZ7oWG9+5noZpvW5r9X7L6RB3I4KHlncz1n9Pi HeFU2+KhBxHiYngTBCdlBhIc7XEqQX2EN9Xa2PbC4Q6h724e+UMlBLQ9W7VTOvG9DPLt sAZG4f6SV5I4q9H4SWLhgGuZ10rsY/evfXuBUvhmNGiOYlhodZc7khtI+zZSEeQHjzOw 6pSeUb//eUJafF6cvTBUrfw7yuHgwLbEweH2abd74tEAw0MJCECl1Wl9yYoEtNc8r1a8 GgXeFRCVanz8pviJlH9og0zhcd1FfrrB9j39Yzv+7jjj3ZQV136WTxieMymAIvboVgks DkYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qXzilONX; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j72si10969724pge.589.2022.02.01.12.38.47; Tue, 01 Feb 2022 12:39:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-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=@infradead.org header.s=casper.20170209 header.b=qXzilONX; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359012AbiAaNP6 (ORCPT + 99 others); Mon, 31 Jan 2022 08:15:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235024AbiAaNP6 (ORCPT ); Mon, 31 Jan 2022 08:15:58 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50BCBC061714; Mon, 31 Jan 2022 05:15:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ga26PmbdXqYDqvVXaK1iI74r5/HqT8MBfA8idE9wScU=; b=qXzilONXk19jBd4Ilqxk8QCaLJ 7o0uoHrdjaLowius3SJRLCJnI3u6WzTJ5HK0+KN3ESSMH4OSh1zw8M/nLoowRK+BaqDrW8SWGeQef U1XvPUT6CcIwLNPB4LZNRc/9L3dj81xiZmBFhg9lXLYUWSifAyDYU72NWHAxo4/42BswWf8IE5s1L SVlqgKSXYwWxJGrJPmWTEVgjC9REqrYIcuiWw8TOcoD2viZVCm4zYWNQrN0x4RNtk1FUKOtA72DmN PPWwAAfVQ+Z8zfo+wlfsu3g+soPdEaycW6pwFjjYJrUCQsY7CuTIMIriPffKFxrtVtCF7nNxYklQp SZPJidEw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEWX7-009t5N-NH; Mon, 31 Jan 2022 13:15:49 +0000 Date: Mon, 31 Jan 2022 13:15:49 +0000 From: Matthew Wilcox To: NeilBrown 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 Message-ID: References: <164360127045.4233.2606812444285122570.stgit@noble.brown> <164360183350.4233.691070075155620959.stgit@noble.brown> <164360492268.18996.14760090171177015570@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <164360492268.18996.14760090171177015570@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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. > Of course swap_writepage ignores sync_mode, so this might not be > entirely relevant. > > But the main point of the patch is not to return AOP_WRITEPAGE_ACTIVATE > to vmscan. It is to avoid writing at all when WB_SYNC_NONE and > congested. e.g. for POSIX_FADV_DONTNEED > It is also to allow the removal of congestion tracking with minimal > changes to behaviour. > > If I end up changing some dead code into different dead code, I really > don't care. I'm not here to clean up all dead code - only the dead code > specifically related to congestion. > > NeilBrown > > > > See commit 21b4ee7029c9, and I had a followup discussion with him > > on IRC: > > > > dchinner: did you gather any stats on how often ->writepage was > > being called by pageout() before "xfs: drop ->writepage completely" > > was added? > > willy: Never saw it on XFS in 3 years in my test environment... > > I don't ever recall seeing the memory reclaim guards we put on > > ->writepage in XFS ever firing - IIRC they'd been there for the best > > part of a decade. > > not so much the WARN_ON firing but the case where it actually calls > > iomap_writepage > > willy: I mean both - I was running with a local patch that warned > > on writepage for a long time, regardless of where it was called from. > > > > I can believe things are different for a network filesystem, or maybe > > XFS does background writeback better than other filesystems, but it > > would be intriguing to be able to get rid of ->writepage altogether > > (or at least from pageout(); migrate.c may be a thornier proposition). > > > >