On 5/26/22 5:19 PM, Al Viro wrote: > On Sun, May 22, 2022 at 07:04:36PM +0000, Al Viro wrote: > >> copy_page_{from,to}_iter() iovec side is needed not for the sake of >> optimizations - if you look at the generic variant, you'll see that it's >> basically "kmap_local_page + copy_{to,from}_iter() for the contents + >> kunmap_local_page", which obviously relies upon the copy_{to,from}_iter() >> being non-blocking. So iovec part of it genuinely needs to differ from >> the generic variant; it's just that on top of that it had been (badly) >> microoptimized. So were iterators, but that got at least somewhat cleaned >> up a while ago. And no, turning that into indirect calls ended up with >> arseloads of overhead, more's the pity... > > Actually, I take that back - the depth of kmap stack won't be increased > by more than one compared to mainline, so we can switch iovec and ubuf > variants to generic. > > See #new.iov_iter; I do like the diffstat - -110 lines of code, with new > flavour added... > > Completely untested, though. That's nice looking indeed. Not just dropping the code, but reducing the unwieldly number of branches in there. A bit pressed for time these days, but I'll try and resurrect some testing mid next week. -- Jens Axboe