mbox series

[PATCHSET,v5,0/9] Turn single segment imports into ITER_UBUF

Message ID 20230328215811.903557-1-axboe@kernel.dk (mailing list archive)
Headers show
Series Turn single segment imports into ITER_UBUF | expand

Message

Jens Axboe March 28, 2023, 9:58 p.m. UTC
Hi,

ather than repeat the same blurb again, see the v2 posting here:

https://lore.kernel.org/linux-fsdevel/20230327180449.87382-1-axboe@kernel.dk/

tldr - turn single segment iovecs into ITER_UBUF rather than ITER_IOVEC,
because they are more efficient.

The main change since v4 is doing the overlay trick in the iov_iter,
so that the first segment of the iovec overlaps nicely with the ubuf
address and length. With that, we can drop any functional driver change,
as the normal iteration should just work out with ubuf having the single
segment. Replace he iter_is_iovec() check with a basic iter->user_backed
instead.

Unfortunately we can't make iov_iter_iovec() much prettier, as we have
to return a copy of the current iovec as the offset has to be added...

Include a block fix for a shoddy copy of an iterator, as that'll
otherwise cause issues.

Ran the liburing test cases and the previously indicated ltp cases
that barfed, and everything looks rosy. Comments welcome - with the
above approach, we don't ever return iter->__ubuf_iovec, it's really
just there as an overlay filler. Maybe we can make that a bit more
apparent.