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 X-Spam-Level: X-Spam-Status: No, score=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8893C433E0 for ; Tue, 2 Feb 2021 20:52:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4BAD164E49 for ; Tue, 2 Feb 2021 20:52:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BAD164E49 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A09E46B0005; Tue, 2 Feb 2021 15:52:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B9AB6B0006; Tue, 2 Feb 2021 15:52:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D0616B006C; Tue, 2 Feb 2021 15:52:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id 76E876B0005 for ; Tue, 2 Feb 2021 15:52:00 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3BFCD1EE6 for ; Tue, 2 Feb 2021 20:52:00 +0000 (UTC) X-FDA: 77774524800.28.wire57_04154ff275cd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 9E6C76C3C for ; Tue, 2 Feb 2021 20:51:58 +0000 (UTC) X-HE-Tag: wire57_04154ff275cd X-Filterd-Recvd-Size: 3710 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Tue, 2 Feb 2021 20:51:58 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 292BB64E38; Tue, 2 Feb 2021 20:51:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612299117; bh=tuhcxZEWP8wGfxb4IWVCAu51pk1hGfeyf/0mzO4am/E=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pkgIJgFSw5wOlPTyd8+7CjE9OrQGsL24d+QWMW3mtBzVcJ4+PxXUESgaIUx+L8YvN zEeC8x0OUqQYnQzSPK7FGEYt98EytaEQ3qpfQ8QBZwuAre2xiX0GOtsjw1TiuzD0o1 njaYWV4LjwrFMl81uNG8izot0rk3e6zjppmf+WJZlNIhAJu+m5nphl5FhywRfazUS+ AwCOkE1np/soDqIP/n3D4xNNFsEpF3K7BCLPycQV4KyGr3C8kUfzhjO7HK2IPOqZk7 oX+KcbAwbKZrof7hTc21bTwNbWJ67qyBghzQ5ztLhQZA/JUFP+cexQWStnE+/YSetO uq4CX6QajEJHg== Date: Tue, 2 Feb 2021 12:51:56 -0800 From: "Darrick J. Wong" To: Dave Chinner Cc: Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 01/16] xfs: drop ->writepage completely Message-ID: <20210202205156.GU7193@magnolia> References: <20181107063127.3902-1-david@fromorbit.com> <20181107063127.3902-2-david@fromorbit.com> <20181109151239.GD9153@infradead.org> <20181112210839.GM19305@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181112210839.GM19305@dastard> 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, Nov 13, 2018 at 08:08:39AM +1100, Dave Chinner wrote: > On Fri, Nov 09, 2018 at 07:12:39AM -0800, Christoph Hellwig wrote: > > [adding linux-mm to the CC list] > > > > On Wed, Nov 07, 2018 at 05:31:12PM +1100, Dave Chinner wrote: > > > From: Dave Chinner > > > > > > ->writepage is only used in one place - single page writeback from > > > memory reclaim. We only allow such writeback from kswapd, not from > > > direct memory reclaim, and so it is rarely used. When it comes from > > > kswapd, it is effectively random dirty page shoot-down, which is > > > horrible for IO patterns. We will already have background writeback > > > trying to clean all the dirty pages in memory as efficiently as > > > possible, so having kswapd interrupt our well formed IO stream only > > > slows things down. So get rid of xfs_vm_writepage() completely. > > > > Interesting. IFF we can pull this off it would simplify a lot of > > things, so I'm generally in favor of it. > > Over the past few days of hammeringon this, the only thing I've > noticed is that page reclaim hangs up less, but it's also putting a > bit more pressure on the shrinkers. Filesystem intensive workloads > that drive the machine into reclaim via the page cache seem to hit > breakdown conditions slightly earlier and the impact is that the > shrinkers are run harder. Mostly I see this as the XFS buffer cache > having a much harder time keeping a working set active. > > However, while the workloads hit the working set cache, writeback > performance does seem to be slightly higher. It is, however, being > offset by the deeper lows that come from the cache being turned > over. > > So there's a bit of rebalancing to be done here as a followup, but > I've been unable to drive the system into unexepected OOM kills or > other bad behaviour as a result of removing ->writepage. FWIW I've been running this patch in my development kernels as part of exercising realtime reflink with rextsize > 1. So far I haven't seen any particularly adverse effects. --D > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com