about summary refs log tree commit homepage
DateCommit message (Collapse)
2011-05-01io_splice 3.1.0 - IO::Splice.copy_stream improvement v3.1.0
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.
2011-05-01minor documentation updates
IO::Splice.copy_stream is more useful, now
2011-05-01IO::Splice.copy_stream doesn't change offset of source file
This is for compatibility with IO.copy_stream and IO#sendfile, both of which use pread()-semantics when given a source file offset. This allows multiple threads/processes to copy from the same file handle.
2011-04-27extconf: remove unnecessary dir_config statement
I didn't know mkmf at the time :<
2011-03-01io_splice 3.0.0 - kinder, gentler Linux zero-copy v3.0.0
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 ruby.io.splice@librelist.com if you can think of a good use for IO.vmsplice or IO.trysplice in Ruby.
2011-02-28doc: more notes for IO.vmsplice
HALP!
2011-02-28remove VERSION constant
Needless cruft and maintenance overhead.
2011-02-28doc: RDoc for new interfaces and changes
And yes, encourage them for non-blocking I/O users.
2011-02-28IO.vmsplice flags argument defaults to zero
For consistency with all of our other methods.
2011-02-28add IO.trytee interface
This allows more-efficient use of non-blocking I/O with tee(2) and will return :EAGAIN instead of generating an expensive Errno::EAGAIN exception.
2011-02-26trysplice implies SPLICE_F_NONBLOCK for flags
It makes more sense this way if non-blocking I/O is expected.
2011-02-26flags are optional for splice and trysplice
No point in requiring the flags argument if it's going to be zero, so default them to zero if they're unset.
2011-02-26shorten calls to rb_thread_blocking_region
Long lines bother me
2011-02-26avoid signed vs unsigned comparison
Caught when compiling with the CFLAGS of Ruby 1.9.3dev
2011-02-26copy_stream: File.open encoding doesn't matter
No need to open in binary mode since no file data goes through luserspace!
2011-02-26test: fix broken assertions on Ruby 1.9.3dev
Oops :x
2011-02-26copy_stream uses IO.trysplice instead of IO.splice
Things should be slightly faster this way.
2011-02-26test: remove unused_port function
It's wholly unnecessary when we don't do exec() for other processes.
2011-02-26add IO.trysplice interface
This reduces the cost of EAGAIN and EOF since they are not considered exceptional conditions.
2011-02-05io/splice: unindent
This seems to fix the issue we had with older RDoc, too
2011-02-05test: cleanup unused_port function
Duh!
2011-02-05clean up packaging and use pkg.mk
2010-12-27doc: switch to wrongdoc
No more JavaScript!
2010-12-27GNUmakefile: sync examples for documentation publishing
The examples on our site were out-of-date.
2010-08-02GNUmakefile: update RAA on new releases
2010-08-02Ruby io_splice 2.2.0 - updates for Linux 2.6.35 v2.2.0
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). http://bogomips.org/ruby_io_splice/doc/IO.html#method-i-pipe_size http://bogomips.org/ruby_io_splice/doc/IO.html#method-i-pipe_size%3D
2010-08-02add IO#pipe_size and IO#pipe_size= accessors
These are friendly wrappers around F_GETPIPE_SZ and F_SETPIPE_SZ fcntl()s in Linux 2.6.35.
2010-06-24test_io_splice: fix broken test
Apparently timing variations were allowing it to succeed under Ruby 1.8/1.9, but Rubinius tripped and exposed the bug.
2010-06-06Ruby io_splice 2.1.0 - IO::Splice.copy_stream fixes v2.1.0
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 collector. 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/
2010-06-06doc: help RDoc read IO::Splice singleton methods
2010-06-06document +src+ and +dst+ for IO::Splice.{full,partial}
Unlike IO::Splice.copy_stream, these require at least one of the source or destination parameters to be a pipe.
2010-06-06GNUmakefile: add rcov target
2010-06-06copy_stream: handle and block on EAGAIN from the non-pipe IO
splice(2) (called without SPLICE_F_NONBLOCK) only blocks on the pipe descriptor, but may trigger EAGAIN from the non-pipe descriptor. So use IO.select to deal with the case where the non-pipe descriptor is non-blocking and wait on it. While we're at it, add the IO::Splice.partial and IO::Splice.full singleton methods to make our life easier to implement copy_stream with. These methods may also be used directly by users who may find them useful.
2010-06-06GNUmakefile: allow passing options to test/unit
2010-06-06copy_stream: cleanup after ourselves
It's a good idea to clean up any file descriptors opened within our method to avoid unnecessary GC invocations.
2010-06-06COPYING: bundle the LGPLv2.1 instead of LGPLv3
The choice of version is up to the user, but bundle the one more likely to be invoked.
2010-06-05Ruby io_splice 2.0.0 v2.0.0
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 copyright holder). Signed-off-by: Eric Wong <normalperson@yhbt.net>
2010-06-05update PIPE_CAPA documentation for Linux 2.6.35
2010-06-05relicense to LGPLv2.1+ (from LGPLv3 only)
This allows GPLv2-only programs to bundle us. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2010-06-05GNUmakefile: make our unit tests PHONY
2010-06-05examples/splice-cp: simplify with IO::Splice.copy_stream
2010-06-05io_splice_ext: require errno.h
It seems needed for Rubinius
2010-06-05copy_stream takes source offset like the non-splice version
This should make it a drop-in replacement for IO.copy_stream, except it won't deal with things like StringIO.
2010-06-03allow IO.vmsplice to take a single string
This could be useful if a Ruby implementation eventually gives us page-aligned strings that we can IO::Splice::F_GIFT
2010-06-01copy_stream: always try to move pages instead of copying
For most case in the forseeable future it's a no-op, but since FUSE will support it in 2.6.35, some folks will be able to use it again.
2010-06-01preliminary support for F_GETPIPE_SZ and F_SETPIPE_SZ
One day soon (2.6.35), we'll be able to resize pipes. We may support this independently of the C library since that can take a few months/years to catch up, taking distro release cycles into account, too.
2010-06-01update IO::Splice::F_MOVE documentation for 2.6.35
FUSE devices will finally gain splice() support and also support SPLICE_F_MOVE in 2.6.35. SPLICE_F_MOVE is still ignored for non-FUSE devices.
2010-06-01simplify examples for 1.0.0 API
2010-06-01implement IO::Splice.copy_stream
This is like IO.copy_stream in Ruby 1.9, but uses the splice() system call internally.
2010-05-27fix indentation bug