Re: question about splice performance

From: Francis Moreau
Date: Mon May 26 2008 - 04:58:05 EST


Hello,

On Sun, May 25, 2008 at 10:47 PM, Jeff Garzik <jeff@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/