On Fri, Mar 24, 2023 at 1:44 PM Jens Axboe <axboe@xxxxxxxxx> wrote: > > We've been doing a few conversions of ITER_IOVEC to ITER_UBUF in select > spots, as the latter is cheaper to iterate and hence saves some cycles. > I recently experimented [1] with io_uring converting single segment READV > and WRITEV into non-vectored variants, as we can save some cycles through > that as well. > > But there's really no reason why we can't just do this further down, > enabling it for everyone. It's quite common to use vectored reads or > writes even with a single segment, unfortunately, even for cases where > there's no specific reason to do so. From a bit of non-scientific > testing on a vm on my laptop, I see about 60% of the import_iovec() > calls being for a single segment. I obviously think this is the RightThing(tm) to do, but it's probably too late for 6.3 since there is the worry that somebody "knows" that it's a IOVEC somewhere. Even if it sounds unlikely, and wrong. Adding Al, who tends to be the main iovec person. Al, see https://lore.kernel.org/all/20230324204443.45950-1-axboe@xxxxxxxxx/ for the series if you didn't already see it on fsdevel. Linus