On 3/27/23 6:08 PM, Al Viro wrote: > On Mon, Mar 27, 2023 at 05:27:13PM -0600, Jens Axboe wrote: >> Add a special case to __import_iovec(), which imports a single segment >> iovec as an ITER_UBUF rather than an ITER_IOVEC. ITER_UBUF is cheaper >> to iterate than ITER_IOVEC, and for a single segment iovec, there's no >> point in using a segmented iterator. > > Won't that enforce the "single-segment readv() is always identical to > read()"? We'd been through that before - some of infinibarf drvivers > have two different command sets, one reached via read(), another - via > readv(). It's a userland ABI. Misdesigned one, but that's infinibarf > for you. How so? We're not changing how we pick ->read vs ->read_iter, just how the iterator is setup. Either method should be happy with either iterator type. -- Jens Axboe