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 23549C4332F for ; Tue, 29 Nov 2022 19:14:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6F7CB6B0071; Tue, 29 Nov 2022 14:14:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 680CE6B0072; Tue, 29 Nov 2022 14:14:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 521D06B0073; Tue, 29 Nov 2022 14:14:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3DEFD6B0071 for ; Tue, 29 Nov 2022 14:14:24 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E66871A0A73 for ; Tue, 29 Nov 2022 19:14:23 +0000 (UTC) X-FDA: 80187430806.04.FF73C38 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 5E7AF40010 for ; Tue, 29 Nov 2022 19:14:22 +0000 (UTC) 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=ZT8K1y0fomD3ovOrP25q9qXv8/nKa1NepgBkRGQnx/c=; b=P5TK2Cg/ft8uEaGWEYuJOx2nTq ++BNFtjzHpjkmt+xbZUJCENMP4R5NzonRN+VWLuix+EnM8rejebY5irBlL/lS7/8qJ4JwyL7mm6Gs Z95A632AvwDYz+7Tn2OT3VQF/DrUt32Mq0M6G00VDaVqx1aEoepS1pnx7ZWlQCKxp1ULw+zClGfna pZ9ewuMH+VcS13cN4AxOLfReKqlmfrysPRifXYSfYsE9d3fKQ9pgLpTO+1D8BEQDMLByyRV+p+4am zZbjZlYckPTU2LVb9gfIG0G8RjJfMNxmyXhZk1lhP13nNA8/S4+xUdQxOs/k4FANWCFTxbCvah0RJ mlwkiT4Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p063Z-00E7rA-Hi; Tue, 29 Nov 2022 19:14:13 +0000 Date: Tue, 29 Nov 2022 19:14:13 +0000 From: Matthew Wilcox To: Chao Yu Cc: "Vishal Moola (Oracle)" , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, fengnan chang , linux-fsdevel@vger.kernel.org Subject: Re: [f2fs-dev] [PATCH v3 14/23] f2fs: Convert f2fs_write_cache_pages() to use filemap_get_folios_tag() Message-ID: References: <20221017202451.4951-1-vishal.moola@gmail.com> <20221017202451.4951-15-vishal.moola@gmail.com> <9c01bb74-97b3-d1c0-6a5f-dc8b11113e1a@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c01bb74-97b3-d1c0-6a5f-dc8b11113e1a@kernel.org> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669749263; a=rsa-sha256; cv=none; b=vt5PfLLKgSXqgnnS1EuVA2eEpcQxCMwDmC5EhhgE3rSIkYHTeJyGw36s2cT3KeRD021VsK G4/5LUpi9PJ4I2pCqtqxB2kdEjnnnVyBuUrIIRMUdU+TYpzGldwoeH8M3h0/ErtlknTxdq APRmE8ZOs1Ak7hkX3U4BTn+XEDFwQB8= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="P5TK2Cg/"; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669749263; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ZT8K1y0fomD3ovOrP25q9qXv8/nKa1NepgBkRGQnx/c=; b=a/2LVOvfSsn/623K8TC8yAEwyzh1ELrKxhq20e5F1T4zRLw0FSxKdTYJ/x9VoWTnUL+xnt p0IMme8KCRssM4uh7pKS67Ffhh9ykTVBNQ+wHtFbRR5cYahl5eYY5W83V/vEXqqHeCe0Eb TiPw9g31YL9KqHVJiXhk6bDvq16LGQM= X-Stat-Signature: rcwgojrzr73kpcepew8n99j68h7fe6ky X-Rspamd-Queue-Id: 5E7AF40010 X-Rspam-User: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="P5TK2Cg/"; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam05 X-HE-Tag: 1669749262-863327 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, Nov 14, 2022 at 03:02:34PM +0800, Chao Yu wrote: > On 2022/10/18 4:24, Vishal Moola (Oracle) wrote: > > Converted the function to use a folio_batch instead of pagevec. This is in > > preparation for the removal of find_get_pages_range_tag(). > > > > Also modified f2fs_all_cluster_page_ready to take in a folio_batch instead > > of pagevec. This does NOT support large folios. The function currently > > Vishal, > > It looks this patch tries to revert Fengnan's change: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=01fc4b9a6ed8eacb64e5609bab7ac963e1c7e486 > > How about doing some tests to evaluate its performance effect? > > +Cc Fengnan Chang Thanks for reviewing this. I think the real solution to this is that f2fs should be using large folios. That way, the page cache will keep track of dirtiness on a per-folio basis, and if your folios are at least as large as your cluster size, you won't need to do the f2fs_prepare_compress_overwrite() dance. And you'll get at least fifteen dirty folios per call instead of fifteen dirty pages, so your costs will be much lower. Is anyone interested in doing the work to convert f2fs to support large folios? I can help, or you can look at the work done for XFS, AFS and a few other filesystems.