On Fri, Mar 24, 2023 at 02:44:41PM -0600, Jens Axboe wrote: > Hi, > > 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 initially was worried that we'd have callers assuming an ITER_IOVEC > iter after a call import_iovec() or import_single_range(), but an audit > of the kernel code actually looks sane in that regard. Of the ones that > do call it, I ran the ltp test cases and they all still pass. Which tree was that audit on? Mainline? Some branch in block.git?