RFC support nonblock submission for splice pipe to pipe
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | io_uring: move sp->len check up for splice and teeio_uring/ | +8 | 0 replies | |
| 2/5 | pipe: add trylock helpers for pipe lockfs/ include/ | +31 | 0 replies | |
| 3/5 | splice: support nonblock for splice from pipe to pipefs/ | +18 | 0 replies | |
| 4/5 | io_uring: support nonblock try for splicing from pipe to pipeio_uring/ | +21 | 0 replies | |
| 5/5 | io_uring: add file_in in io_splice{} to avoid duplicate calculationio_uring/ | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 0/5] support nonblock submission for splice pipe to pipe
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
Signature · 1 line
2.25.1