Messages in this thread | | | Date | Sat, 12 Jun 2021 21:47:29 +0000 | From | Al Viro <> | Subject | Re: [RFC 5/9] iov_iter: Add iov_iter_fault_in_writeable() |
| |
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...
| |