public inbox for [email protected]
 help / color / mirror / Atom feed
* [RFC 0/5] support nonblock submission for splice pipe to pipe
@ 2022-06-07  8:06 Hao Xu
  2022-06-07  8:06 ` [PATCH 1/5] io_uring: move sp->len check up for splice and tee Hao Xu
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Hao Xu @ 2022-06-07  8:06 UTC (permalink / raw)
  To: io-uring
  Cc: Jens Axboe, Pavel Begunkov, linux-fsdevel, Alexander Viro,
	Andrew Morton, Luis Chamberlain, Kuniyuki Iwashima

From: Hao Xu <[email protected]>

splice from pipe to pipe is a trivial case, and we can support nonblock
try for it easily. splice depends on iowq at all which is slow. Let's
build a fast submission path for it by supporting nonblock.

Wrote a simple test to test time spent of splicing from pipe to pipe:


Did 50 times test for each, ignore the highest and lowest number,
calculate the average number:

before patchset: 119.85 usec
with patchset: 29.5 usec

----------------
I'm not sure if we should use a io_uring specific flag rather than
SPLICE_F_NONBLOCK since from mutex_lock_nest to mutex_trylock changes
the behavior under debug environment I guess. Or maybe there is another
better option than mutex_trylock?


Hao Xu (5):
  io_uring: move sp->len check up for splice and tee
  pipe: add trylock helpers for pipe lock
  splice: support nonblock for splice from pipe to pipe
  io_uring: support nonblock try for splicing from pipe to pipe
  io_uring: add file_in in io_splice{} to avoid duplicate calculation

 fs/pipe.c                 | 29 +++++++++++++++++++++
 fs/splice.c               | 21 +++++++++++++---
 include/linux/pipe_fs_i.h |  2 ++
 io_uring/splice.c         | 53 +++++++++++++++++++++++++++++----------
 4 files changed, 89 insertions(+), 16 deletions(-)


base-commit: d8271bf021438f468dab3cd84fe5279b5bbcead8
-- 
2.25.1


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

end of thread, other threads:[~2022-06-14 13:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-07  8:06 [RFC 0/5] support nonblock submission for splice pipe to pipe Hao Xu
2022-06-07  8:06 ` [PATCH 1/5] io_uring: move sp->len check up for splice and tee Hao Xu
2022-06-07  8:06 ` [PATCH 2/5] pipe: add trylock helpers for pipe lock Hao Xu
2022-06-07  8:06 ` [PATCH 3/5] splice: support nonblock for splice from pipe to pipe Hao Xu
2022-06-07  8:06 ` [PATCH 4/5] io_uring: support nonblock try for splicing " Hao Xu
2022-06-07 21:38   ` kernel test robot
2022-06-08 14:18   ` kernel test robot
2022-06-09  2:24   ` kernel test robot
2022-06-07  8:06 ` [PATCH 5/5] io_uring: add file_in in io_splice{} to avoid duplicate calculation Hao Xu
2022-06-07  8:13 ` [RFC 0/5] support nonblock submission for splice pipe to pipe Hao Xu
2022-06-07  9:27 ` Pavel Begunkov
2022-06-08  4:19   ` Hao Xu
2022-06-08  4:31     ` Jens Axboe
2022-06-08 11:33     ` Pavel Begunkov
2022-06-14 13:23 ` Hao Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox