io_splice 4.1.1 - workaround socket -> pipe issues / 2011-05-18 00:19 UTC
IO::Splice.copy_stream now uses SPLICE_F_NONBLOCK whenever the
destination is a pipe. Our documentation is also updated to
reflect the issue of splicing from sockets into pipes.
io_splice 4.1.0 - copy_stream enhancement for 1.9 / 2011-05-16 16:53 UTC
IO::Splice.copy_stream coerces based on the availability of
the #to_path method in source and destination arguments.
This is to be compatible with IO.copy_stream and also
Rack::File since this may be used in web servers.
This is NOT visible with Ruby 1.8 since File.open
doesn't coerce with #to_path on the given object.
io_splice 4.0.0 - easier to use! / 2011-05-13 02:40 UTC
Methods now automatically retry on EINTR after checking
IO#closed? and executing interrupts.
There is a new IO::Splice::WAITALL flag (implemented in
userspace) which may be used to cause IO.splice and IO.tee
to retry (while the GVL is released) until the operation
IO::Splice.copy_stream now works correctly for large copies
if source offset is specified.
MRI 1.8 is only weakly supported now, MRI 1.9 is the
preferred platform though Rubinius appears to work, too.
io_splice 3.1.0 - IO::Splice.copy_stream improvement / 2011-05-01 21:17 UTC
IO::Splice.copy_stream no longer modifies the actual file offset
of the given source file (if it's a regular file). This follows
IO.copy_stream and IO#sendfile semantics, allowing multiple
threads/processes to simultaneously stream a single regular file
descriptor to multiple sockets/pipes.
io_splice 3.0.0 - kinder, gentler Linux zero-copy / 2011-03-01 09:38 UTC
This release adds the IO.trysplice and IO.trytee interfaces
to avoid expensive EAGAIN exceptions for non-blocking I/O.
There is no IO.tryvmsplice method as we still haven't figured
out a good use for IO.vmsplice in Ruby, and non-blocking I/O
with iovecs is just painful! If you want more zero-copy fun
without needing mmap(2), check out the "sendfile" RubyGem and
IO.copy_stream (1.9). As of Linux 2.6.33+, sendfile(2) can copy
mmap-able files to +any+ descriptor, not just sockets.
Please email us at firstname.lastname@example.org if you can think
of a good use for IO.vmsplice or IO.trysplice in Ruby.
Ruby io_splice 2.2.0 - updates for Linux 2.6.35 / 2010-08-02 08:05 UTC
This release adds IO#pipe_size and IO#pipe_size= accessors for
resizing the kernel pipe buffer under Linux 2.6.35+. This
functionality may be used to either reduce memory footprint or
make large copies with fewer method dispatches and system calls.
These methods are only available when run under Linux 2.6.35 or
later (but always built, so there's no need to recompile this
library after upgrading your kernel).
Ruby io_splice 2.1.0 - IO::Splice.copy_stream fixes / 2010-06-06 20:37 UTC
This fixes the issue with our copy_stream where non-pipe
descriptors with the O_NONBLOCK flag set were not handled
correctly. Like IO.copy_stream in Ruby 1.9, our
IO::Splice.copy_stream will _always_ block until IO is available
(or raise if there are errors).
IO::Splice.copy_stream now closes all file descriptors that were
opened within the method, reducing pressure on the garbage
There are also new singleton convenience methods:
* IO::Splice.full - blocks and splices the full amount
* IO::Splice.partial - blocks until something is spliceable
They are used internally to implement IO::Splice.copy_stream,
but may also be useful to end users.
Rcov shows 100% test coverage \o/
Ruby io_splice 2.0.0 / 2010-06-05 08:48 UTC
There is a new IO::Splice.copy_stream method which is similar to
the IO.copy_stream method in 1.9 core, but uses splice()
internally to avoid copies to userspace in situations where
sendfile() is not possible.
With Linux 2.6.35 (and header files to match), we will also
export the F_GETPIPE_SZ and and F_SETPIPE_SZ constants so
they can be used with fcntl() to resize pipe buffers.
The documentation is also updated to reflect the returned
usefulness of the IO::Splice::F_MOVE constant for FUSE
filesystems under Linux 2.6.35.
I've also relicensed to LGPLv2.1+ (from LGPLv3-only) to allow
bundling with GPLv2-only applications (I'm currently the sole
Signed-off-by: Eric Wong <email@example.com>
io_splice 1.0.0 / 2010-05-27 20:43 UTC
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.
io_splice 0.1.0 / 2010-02-15 08:36 UTC