Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3865720pxf; Mon, 15 Mar 2021 22:50:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS09GmCI6y3EoZ39oUSIudspKlt86+92+OmTtW0M7KHhT4e45vtahSKzqEoICC+DdXlaWR X-Received: by 2002:a17:906:5a8f:: with SMTP id l15mr27817653ejq.462.1615873856109; Mon, 15 Mar 2021 22:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615873856; cv=none; d=google.com; s=arc-20160816; b=pV8htPoaaJPAX7bbJ79HRro88MI08kQpxIZZW+ymoCRyqatf3HYrnPvAHIipdeNUJw tzXGi0bfIoS8kof/cbjGsZEbwsSNCErXseqinbIRm8wu9YR9eZzT+S8srBqDdmZ9/+ff VWo8tjUjq1LM9nCErZ3o5viMo8nuWKGMeAgM2nYZBBoIF0ZFFIX1I7IVPeFqP10SkTDD 1hsnm+fh83ns9sC1qdPV5qhZrKOOC8QXdmcq6sqn2sTrCVqQ3Q7YmFde6LDse5U+/I0e i6TDNGbuUf4MyeL7VmZKbBtLxhmMU/v9HqdI2w1GgOt3d714rlvN03Rg3syM+VCpv7a9 MYMA== 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; bh=Ds9vC3JmJss1jDWx1EEQjfw+OC9jRHtTVjZuUaouYIk=; b=M7Rd9UA8ziv+LmhepR07M/FM2bwU485Z1a3q1GHIyGLAl0BXi45zBQcmVZ/Rvkt7aS cxLWsRBNI/yhCBFAclMMvQUBES1p1EAksBw29D5F6XdpF8ByzrAQbMm1GXe8yWPb+GEL M6G5wqkHWGOtFMOqKrAxFlEh3zf1xMo/LvWtbS6Uh00lbciNfk1sieXPJKMJN3LoSIAX RD2hj1EGbzPnX6gNDkmkWoe9e9BFJDA0azaT0/+PkjOYRkycEB9XIIokOSr4snoYN+a8 7dXCcxkYyH57KNhPdEFfzlMQEKOPtu0CmP8VmgH2ROtbl/gv0W/QU14afXnPiGL8uO40 2yYQ== ARC-Authentication-Results: i=1; mx.google.com; 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 jw5si12873448ejc.103.2021.03.15.22.50.34; Mon, 15 Mar 2021 22:50:56 -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; 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 S231828AbhCOW1p (ORCPT + 99 others); Mon, 15 Mar 2021 18:27:45 -0400 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:47511 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231969AbhCOW1Q (ORCPT ); Mon, 15 Mar 2021 18:27:16 -0400 Received: from dread.disaster.area (pa49-181-239-12.pa.nsw.optusnet.com.au [49.181.239.12]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 2A868828671; Tue, 16 Mar 2021 09:27:09 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1lLvg4-002xIa-IE; Tue, 16 Mar 2021 09:27:08 +1100 Date: Tue, 16 Mar 2021 09:27:08 +1100 From: Dave Chinner To: Matthew Wilcox Cc: Christoph Hellwig , Michal Hocko , "Kirill A. Shutemov" , Hugh Dickins , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v4 00/25] Page folios Message-ID: <20210315222708.GA349301@dread.disaster.area> References: <20210305041901.2396498-1-willy@infradead.org> <20210313123658.ad2dcf79a113a8619c19c33b@linux-foundation.org> <20210315115501.7rmzaan2hxsqowgq@box> <20210315190904.GB150808@infradead.org> <20210315194014.GZ2577561@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315194014.GZ2577561@casper.infradead.org> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=F8MpiZpN c=1 sm=1 tr=0 cx=a_idp_d a=gO82wUwQTSpaJfP49aMSow==:117 a=gO82wUwQTSpaJfP49aMSow==:17 a=kj9zAlcOel0A:10 a=dESyimp9J3IA:10 a=7-415B0cAAAA:8 a=22_hVACOjlP6-iFW9EAA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 07:40:14PM +0000, Matthew Wilcox wrote: > I would agree that the conversion is both straightforward and noisy. > There are some minor things that crop up, like noticing that we get > the accounting wrong for writeback of compound pages. That's not > entirely unexpected since no filesystem supports both compound pages > and writeback today. And this is where the abstraction that the "folio" introduces is required - filesystem people don't want to have to deal with all the complexity and subtlety of compound pages when large page support is added to the page cache. As Willy says, this will be a never-ending source of data corruption bugs.... Hence from the filesystem side of things, I think this abstraction is absolutely necessary. Especially because handling buffered IO in 4kB pages really, really sucks from a performance persepctive and the sooner we have native high-order page support in the page cache the better. These days buffered IO often can't even max out a cheap NVMe SSD because of the CPU cost of per-page state management in the page cache. So the sooner we have large page support to mitigate the worst of the overhead for streaming buffered IO, the better. FWIW, like others, I'm not a fan of "folio" as a name, but I can live with it because it so jarringly different to "pages" that we're not going to confuse the two of them. But if we want a better name, my suggestion would be for a "struct cage" as in Compound pAGE.... Cheers, Dave. -- Dave Chinner david@fromorbit.com