[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YQx4lx7vEbvmfBnE@casper.infradead.org>
Date: Fri, 6 Aug 2021 00:47:35 +0100
From: Matthew Wilcox <willy@...radead.org>
To: David Howells <dhowells@...hat.com>
Cc: Anna Schumaker <anna.schumaker@...app.com>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Jeff Layton <jlayton@...hat.com>,
Steve French <sfrench@...ba.org>,
Dominique Martinet <asmadeus@...ewreck.org>,
Mike Marshall <hubcap@...ibond.com>,
Miklos Szeredi <miklos@...redi.hu>,
Shyam Prasad N <nspmangalore@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-cachefs@...hat.com, linux-afs@...ts.infradead.org,
linux-nfs@...r.kernel.org, linux-cifs@...r.kernel.org,
ceph-devel@...r.kernel.org, v9fs-developer@...ts.sourceforge.net,
devel@...ts.orangefs.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Canvassing for network filesystem write size vs page size
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.
Powered by blists - more mailing lists