Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp894094pxv; Thu, 15 Jul 2021 19:10:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzK92gmPFC9a783A/KVXGdPNPpXrTrax94LJorEciNcLO0qSA0j9bPApupmuI4A9GfB4HUF X-Received: by 2002:a02:a797:: with SMTP id e23mr6709914jaj.121.1626401437557; Thu, 15 Jul 2021 19:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626401437; cv=none; d=google.com; s=arc-20160816; b=BFuAOG87wbPg+/eHMXQA6REC00VpF0Cb27WbuScyBMmdTEs3Hkif2TSPYBIe5K4U8g PDbpUMJWbdYAGUgQCPGpWHpscW5Bhsr/DY4tAjs//d8LfNQwDKROX6RFZ/DrhJha43nS 36MD4aGipagt0CQGbsUUVSBqb88A2TFa9AK8jp3rsa3v/sNL4MMZCH2sOIdiEPdgYKL9 pN2H8x6tDG0diBtHVmBI5QapSyEcFvswKBoY7ZRwxTMoQNougfUiAWTbq/5T4V7y75uO HIkFHzsnO+WExVpLi7/HO92gq6wM/jdqiAxbG4PXRA06hMuzlL19sq+LqNCgd3dCkYs+ rPUw== 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=yiRhxxbR+vQ5qbuTqU1Ha6uMzPQoPlac3XG7Lxx4jJs=; b=JaLlqlWfu+MbycPFpUyAh/x2GAzmIRAqKkYFL56aaICNFkyZj+Zr0XJ/qtFvwexxQs ndxVHPmecpJqmQTe1BEk4AADqBrzqm32CJVUJ0Q5ngswhhJI8nWIxGLjekNYAYSiuB4L RO7jCsO3DZB0YSdprPEbJMx+XKGEU6qa4s6i9PegG5LgIr+ONXFcDZ2F5PtdlftsjVlK kgB4CqXD7iYYIyQw6XZP2PLUr01Ak5a9tVZ119UTX4Cy6GxZ41kbf2m3OxcNb8ohfX+V Q15lyYnrgdwswrOMJuRbx5GuycUeQpJrjYVeXUI76whu0wDmavXoI3bbOQBQhnMldG44 z+cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=HZWgPg26; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 187si8673040iow.86.2021.07.15.19.10.23; Thu, 15 Jul 2021 19:10:37 -0700 (PDT) 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=@infradead.org header.s=casper.20170209 header.b=HZWgPg26; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232428AbhGPCLd (ORCPT + 99 others); Thu, 15 Jul 2021 22:11:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbhGPCLa (ORCPT ); Thu, 15 Jul 2021 22:11:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2BACC06175F; Thu, 15 Jul 2021 19:08:36 -0700 (PDT) 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=yiRhxxbR+vQ5qbuTqU1Ha6uMzPQoPlac3XG7Lxx4jJs=; b=HZWgPg26qb9x9qP4jzQXNTg9K0 qCOQMuI4vrMemHNWvFsP0bYxE5T1XCaL+JQLI3Zyv07775Y6kfXjsQORpD8N+LnjqMF465xeT89l0 lTIEjas9Z/pKIKNBma771J0VJRIJDGR5A58jty6Ij7Z/PMjpduG5leUagrgexzja5NU4W1ehM+stw G/PeW1RtFGrRLxWU6QxyVRNnPwQW8NyomGJDaxgioEUdL9CYzzKGGybBfuxCgEUAV7wq1dyMqm9mb b30O7q6+5bVfNP5FzN2E5tuNyNvNusPi2bmJoiaCaOqjDTjGGK4QwhjisaydWM+Hg0FRmYjsbUeAa 22tEgBvg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4DFa-0043I1-80; Fri, 16 Jul 2021 02:07:07 +0000 Date: Fri, 16 Jul 2021 03:06:50 +0100 From: Matthew Wilcox To: "Darrick J. Wong" Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v14 106/138] iomap: Convert iomap_do_writepage to use a folio Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-107-willy@infradead.org> <20210715220505.GQ22357@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715220505.GQ22357@magnolia> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 03:05:05PM -0700, Darrick J. Wong wrote: > On Thu, Jul 15, 2021 at 04:36:32AM +0100, Matthew Wilcox (Oracle) wrote: > > Writeback an entire folio at a time, and adjust some of the variables > > to have more familiar names. > > @@ -1398,16 +1397,15 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, > > static int > > iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data) > > I imagine at some point this will become iomap_do_writefolio and ther > will be some sort of write_cache_folios() call? Or the equivalent > while(get_next_folio_to_wrote()) iomap_write_folio(); type loop? I hadn't quite got as far as planning out what to do next with a replacement for write_cache_pages(). At a minimum, that function is going to work on folios -- it does anyway; we don't tag tail pages in the xarray, so the tagged lookup done by write_cache_pages() only finds folios. So everything we do with a page there is definitely looking at a folio. I want to get a lot more filesystems converted to use folios before I undertake the write_cache_pages() interface overhaul (and I'll probably think of several things to do to it at the same time -- like working on a batch of pages all at once instead of calling one indirect function per folio).