Posted By: Eric Wong
Date: 2010-05-27 20:51
Summary: io_splice - zero-copy pipe I/O for Linux and Ruby
Project: Quack Ruby Projects
The splice family of Linux system calls can transfer data between file descriptors without the need to copy data into userspace. Instead of a userspace buffer, they rely on an ordinary Unix pipe as a kernel-level buffer.
* http://bogomips.org/ruby_io_splice/ * ruby.io.splice@librelist.com />* git://git.bogomips.org/ruby_io_splice.git
Changes:
io_splice is now easier to use, as it can take IO/File objects in addition to raw file descriptors as arguments.
IO.vmsplice now always splices buffers in full, since it's too difficult to use otherwise. Keep in mind that the usefulness of vmsplice is still questionable from Ruby and IO.writev (from the "io-extra" gem) is more flexible as it allows writing to non-pipe descriptors.
There are also some code cleanups and improved documentation. |
|