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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 D6844C4338F for ; Thu, 5 Aug 2021 23:48:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5345D61102 for ; Thu, 5 Aug 2021 23:48:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5345D61102 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B15A38D0001; Thu, 5 Aug 2021 19:48:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A9F8B6B0071; Thu, 5 Aug 2021 19:48:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9674B8D0001; Thu, 5 Aug 2021 19:48:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id 7C4306B006C for ; Thu, 5 Aug 2021 19:48:33 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 25B2F180AE7E2 for ; Thu, 5 Aug 2021 23:48:33 +0000 (UTC) X-FDA: 78442668906.38.4C2E02D Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf24.hostedemail.com (Postfix) with ESMTP id 8359BB003A26 for ; Thu, 5 Aug 2021 23:48:32 +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=H3DXaH0DYq/AU+2Gphrkn9Lwf3WnAckLZe9TrSof2hk=; b=abtQMLOoZXkVPjuUhEHDqRyq8B KaXEaoLL1BbXX3emsso4LunhdcKMhxkxFYrvD42OWevUVXBkxay+rvTGncsdtcRnfeBGk8FEEJ82g 7/1GwpkJ5N+N8oeYGnLfSHWILFgbWRZWolqBrSWognGRqvZRQXjAioMsIt7VqwR/5y0set0rb2Sl8 h9eiGCC6w7qRlR//cfZPoHad3zUxLgvZHKF63EjM+zKlK/T0Bdbw8efLJ0qrWM7BwE0fJDaDjccp8 JIHfTwF5MfItHb3bT+6SzPp1jD/VaVUH71EQLFXh7i5EzMqMKWZH/pY+tCRYFBtVdRh4Xsh6Krd+Y hXAscibg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBn5L-007d2p-Uz; Thu, 05 Aug 2021 23:47:39 +0000 Date: Fri, 6 Aug 2021 00:47:35 +0100 From: Matthew Wilcox To: David Howells Cc: Anna Schumaker , Trond Myklebust , Jeff Layton , Steve French , Dominique Martinet , Mike Marshall , Miklos Szeredi , Shyam Prasad N , Linus Torvalds , linux-cachefs@redhat.com, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, devel@lists.orangefs.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Canvassing for network filesystem write size vs page size Message-ID: References: <1017390.1628158757@warthog.procyon.org.uk> <1170464.1628168823@warthog.procyon.org.uk> <1186271.1628174281@warthog.procyon.org.uk> <1219713.1628181333@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1219713.1628181333@warthog.procyon.org.uk> Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=abtQMLOo; dmarc=none; spf=none (imf24.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Stat-Signature: 1q1dy4d8ok33cse6y6mhb8h8yartmaip X-Rspamd-Queue-Id: 8359BB003A26 X-Rspamd-Server: rspam01 X-HE-Tag: 1628207312-869108 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 Thu, Aug 05, 2021 at 05:35:33PM +0100, David Howells wrote: > With Willy's upcoming folio changes, from a filesystem point of view, we're > going to be looking at folios instead of pages, where: > > - a folio is a contiguous collection of pages; > > - each page in the folio might be standard PAGE_SIZE page (4K or 64K, say) or > a huge pages (say 2M each); This is not a great way to explain folios. If you're familiar with compound pages, a folio is a new type for either a base page or the head page of a compound page; nothing more and nothing less. If you're not familiar with compound pages, a folio contains 2^n contiguous pages. They are treated as a single unit. > - a folio has one dirty flag and one writeback flag that applies to all > constituent pages; > > - a complete folio currently is limited to PMD_SIZE or order 8, but could > theoretically go up to about 2GiB before various integer fields have to be > modified (not to mention the memory allocator). Filesystems should not make an assumption about this ... I suspect the optimum page size scales with I/O bandwidth; taking PCI bandwidth as a reasonable proxy, it's doubled five times in twenty years. > Willy is arguing that network filesystems should, except in certain very > special situations (eg. O_SYNC), only write whole folios (limited to EOF). I did also say that the write could be limited by, eg, a byte-range lease on the file. If the client doesn't have permission to write a byte range, then it doesn't need to write it back.