From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Date: Sat, 12 Jun 2021 21:47:29 +0000 Subject: [Cluster-devel] [RFC 5/9] iov_iter: Add iov_iter_fault_in_writeable() In-Reply-To: References: <20210531170123.243771-1-agruenba@redhat.com> <20210531170123.243771-6-agruenba@redhat.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Sat, Jun 12, 2021 at 02:33:31PM -0700, Linus Torvalds wrote: > That said, reads are obviously much easier, and I'd probably prefer > the model for writes to be to not necessarily pre-fault anything at > all, but just write to user space with page faults disabled. *nod* I don't like that write pre-fault model at all - note that unlike read we'll end up with atomic operations, etc. and there's a plenty of non-obvious ways for that to end up being costly, even assuming it works correctly in all cases. O_DIRECT case is a PITA - there we use GUP and there's no way to tell GUP that in the current situation we do *NOT* want to hit ->fault()/->page_mkwrite()/etc. pagefault_disable() won't be even noticed there...