lkml.org 
[lkml]   [2008]   [May]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 26 May 2008 10:57:54 +0200
From"Francis Moreau" <>
SubjectRe: question about splice performance
Hello,

On Sun, May 25, 2008 at 10:47 PM, Jeff Garzik <jeff@garzik.org> wrote:
>
> If you drop caches you are not measuring splice speed.
>
> Use ramfs for your tests (guarantees data is in cache) instead.
>

So it seems that the gain when using splice to copy a file into another file
is very limited. Maybe that's the reason why cp is still using read/write...

Also splice-cp uses 2 calls to splice syscall in a loop. So it end up doing a
lot of syscalls. Maybe using sendfile instead of is better.

Also2, since splice is a generalized pipe, it might be better to create to
processes, one writing to the pipe and the other one reading to have better
workflow.

That said I also see some use cases where splice could be more useful,
specially when one of the file descriptor is actually a device: one the write
side of the pipes a device could write some data while on the other side of
the pipe a process can empty the pipe by writing the data to a file.

Are there any plans to improve splice interface to be used by drivers ?

Thanks.
-- 
Francis


\
 
 \ /
  Last update: 2008-05-26 11:01    [from the cache]
©2003-2008