From: Jens Axboe <axboe@kernel.dk>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, torvalds@linux-foundation.org,
brauner@kernel.org
Subject: Re: [PATCHSET 0/2] Turn single segment imports into ITER_UBUF
Date: Mon, 27 Mar 2023 12:01:08 -0600 [thread overview]
Message-ID: <1ef65695-4e66-ebb8-3be8-454a1ca8f648@kernel.dk> (raw)
In-Reply-To: <20230325044654.GC3390869@ZenIV>
On 3/24/23 10:46 PM, Al Viro wrote:
> 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?
It was just master in -git. But looks like I did miss two spots, I've
updated the series here and will send out a v2:
https://git.kernel.dk/cgit/linux-block/log/?h=iter-ubuf
--
Jens Axboe
next prev parent reply other threads:[~2023-03-27 18:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 20:44 [PATCHSET 0/2] Turn single segment imports into ITER_UBUF Jens Axboe
2023-03-24 20:44 ` [PATCH 1/2] iov_iter: convert import_single_range() to ITER_UBUF Jens Axboe
2023-03-24 20:44 ` [PATCH 2/2] iov_iter: import single vector iovecs as ITER_UBUF Jens Axboe
2023-03-24 21:14 ` [PATCHSET 0/2] Turn single segment imports into ITER_UBUF Linus Torvalds
2023-03-24 21:52 ` Jens Axboe
2023-03-25 4:46 ` Al Viro
2023-03-27 18:01 ` Jens Axboe [this message]
2023-03-27 18:42 ` Al Viro
2023-03-27 18:52 ` Jens Axboe
2023-03-27 18:59 ` Jens Axboe
2023-03-27 20:02 ` Al Viro
2023-03-27 20:03 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ef65695-4e66-ebb8-3be8-454a1ca8f648@kernel.dk \
--to=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).