linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET v5 0/9] Turn single segment imports into ITER_UBUF
@ 2023-03-28 21:58 Jens Axboe
  2023-03-28 21:58 ` [PATCH 1/9] block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly Jens Axboe
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Jens Axboe @ 2023-03-28 21:58 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: torvalds, brauner, viro

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.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-03-29  0:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-28 21:58 [PATCHSET v5 0/9] Turn single segment imports into ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 1/9] block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly Jens Axboe
2023-03-28 21:58 ` [PATCH 2/9] iov_iter: teach iov_iter_iovec() to deal with ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 3/9] iov_iter: overlay struct iovec and ubuf/len Jens Axboe
2023-03-28 22:16   ` Linus Torvalds
2023-03-28 22:19     ` Jens Axboe
2023-03-28 22:30       ` Linus Torvalds
2023-03-29  0:38         ` Jens Axboe
2023-03-28 21:58 ` [PATCH 4/9] iov_iter: set nr_segs = 1 for ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 5/9] IB/hfi1: check for user backed iterator, not specific iterator type Jens Axboe
2023-03-28 21:58 ` [PATCH 6/9] IB/qib: " Jens Axboe
2023-03-28 21:58 ` [PATCH 7/9] ALSA: pcm: " Jens Axboe
2023-03-28 21:58 ` [PATCH 8/9] iov_iter: convert import_single_range() to ITER_UBUF Jens Axboe
2023-03-28 21:58 ` [PATCH 9/9] iov_iter: import single vector iovecs as ITER_UBUF Jens Axboe

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).