Re: [RFC 0/5] support nonblock submission for splice pipe to pipe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/7/22 09:06, Hao Xu wrote:
From: Hao Xu <howeyxu@xxxxxxxxxxx>

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.

fwiw,

https://www.spinics.net/lists/kernel/msg3652757.html



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

--
Pavel Begunkov



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux