LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com> To: Matthew Wilcox <willy@infradead.org> Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, jlayton@kernel.org, Christoph Hellwig <hch@infradead.org>, Linus Torvalds <torvalds@linux-foundation.org>, dchinner@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Could it be made possible to offer "supplementary" data to a DIO write ? Date: Thu, 05 Aug 2021 16:38:52 +0100 [thread overview] Message-ID: <1216854.1628177932@warthog.procyon.org.uk> (raw) In-Reply-To: <YQv+iwmhhZJ+/ndc@casper.infradead.org> Matthew Wilcox <willy@infradead.org> wrote: > > Note that PAGE_SIZE varies across arches and folios are going to > > exacerbate this. What I don't want to happen is that you read from a > > file, it creates, say, a 4M (or larger) folio; you change three bytes and > > then you're forced to write back the entire 4M folio. > > Actually, you do. Two situations: > > 1. Application uses MADVISE_HUGEPAGE. In response, we create a 2MB > page and mmap it aligned. We use a PMD sized TLB entry and then the > CPU dirties a few bytes with a store. There's no sub-TLB-entry tracking > of dirtiness. It's just the whole 2MB. That's a special case. The app specifically asked for it. I'll grant with mmap you have to mark a whole page as being dirty - but if you mmapped it, you need to understand that's what will happen. > 2. The bigger the folio, the more writes it will absorb before being > written back. So when you're writing back that 4MB folio, you're not > just servicing this 3 byte write, you're servicing every other write > which hit this 4MB chunk of the file. You can argue it that way - but we already do it bytewise in some filesystems, so what you want would necessitate a change of behaviour. Note also that if the page size > max RPC payload size (1MB in NFS, I think), you have to make multiple write operations to fulfil that writeback; further, if you have an object-based system you might be making writes to multiple servers, some of which will not actually make a change, to make that writeback. I wonder if this needs pushing onto the various network filesystem mailing lists to find out what they want and why. David
next prev parent reply other threads:[~2021-08-05 15:39 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-05 10:19 Could it be made possible to offer "supplementary" data to a DIO write ? David Howells 2021-08-05 12:37 ` Matthew Wilcox 2021-08-05 13:07 ` David Howells 2021-08-05 13:35 ` Matthew Wilcox 2021-08-05 14:38 ` David Howells 2021-08-05 15:06 ` Matthew Wilcox 2021-08-05 15:38 ` David Howells [this message] 2021-08-05 16:35 ` Canvassing for network filesystem write size vs page size David Howells 2021-08-05 17:27 ` Linus Torvalds 2021-08-05 17:43 ` Trond Myklebust 2021-08-05 22:11 ` Matthew Wilcox 2021-08-06 13:42 ` David Howells 2021-08-06 14:17 ` Matthew Wilcox 2021-08-06 15:04 ` David Howells 2021-08-05 17:52 ` Adam Borowski 2021-08-05 18:50 ` Jeff Layton 2021-08-05 23:47 ` Matthew Wilcox 2021-08-06 13:44 ` David Howells 2021-08-05 17:45 ` Could it be made possible to offer "supplementary" data to a DIO write ? Adam Borowski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1216854.1628177932@warthog.procyon.org.uk \ --to=dhowells@redhat.com \ --cc=dchinner@redhat.com \ --cc=hch@infradead.org \ --cc=jlayton@kernel.org \ --cc=linux-block@vger.kernel.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=torvalds@linux-foundation.org \ --cc=willy@infradead.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).