linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET v2 0/4] Turn single segment imports into ITER_UBUF
@ 2023-03-27 18:04 Jens Axboe
  2023-03-27 18:04 ` [PATCH 1/4] fs: make do_loop_readv_writev() deal with ITER_UBUF Jens Axboe
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jens Axboe @ 2023-03-27 18:04 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: torvalds, brauner, viro

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.

Ran some unscientific performanc tests [2] as well.

Changes since v1:

- Add two prep patches converting ITER_IOVEC assumptions
- Add missing import_ubuf() return value check in __import_iovec_ubuf()

[1] https://lore.kernel.org/io-uring/43cb1fb7-b30b-8df1-bba6-e50797d680c6@kernel.dk/
[2] https://lore.kernel.org/all/45c46ee9-8479-4114-6ce9-ae3082335cb8@kernel.dk/



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

end of thread, other threads:[~2023-03-27 19:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-27 18:04 [PATCHSET v2 0/4] Turn single segment imports into ITER_UBUF Jens Axboe
2023-03-27 18:04 ` [PATCH 1/4] fs: make do_loop_readv_writev() deal with ITER_UBUF Jens Axboe
2023-03-27 19:03   ` Linus Torvalds
2023-03-27 19:06     ` Jens Axboe
2023-03-27 19:11       ` Linus Torvalds
2023-03-27 19:13         ` Linus Torvalds
2023-03-27 19:14           ` Jens Axboe
2023-03-27 18:04 ` [PATCH 2/4] mm: make process_madvise() " Jens Axboe
2023-03-27 18:04 ` [PATCH 3/4] iov_iter: convert import_single_range() to ITER_UBUF Jens Axboe
2023-03-27 18:04 ` [PATCH 4/4] 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).