Files | Admin

Notes:

Release Name: 4.0.0

Notes:
io_splice 4.0.0 - easier to use!

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://bogomips.org/ruby_io_splice.git

Changes:

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
is complete.

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.



Changes: GIT-VERSION-GEN | 2 +- ext/io_splice/io_splice_ext.c | 256 ++++++++++++++++++++---------- lib/io/splice.rb | 62 +++---- lib/io/splice/mri_18.rb | 34 ++++ test/test_copy_stream.rb | 340 ++++++++++++++++++++++++++++++++++++++++ test/test_io_splice.rb | 9 +- test/test_io_splice_eintr.rb | 35 ++++ test/test_io_splice_in_full.rb | 39 +++++ 8 files changed, 655 insertions(+), 122 deletions(-) commit fdec276346fb0aa764499f7ad0483b6ba51685a5 Author: Eric Wong Date: Thu May 12 19:39:12 2011 -0700 io_splice 4.0.0 - easier to use! 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 is complete. 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. commit 48bfb5ce0706334fc8ba42e2f517623fbe90d8b4 Author: Eric Wong Date: Thu May 12 19:28:41 2011 -0700 fix up documentation for fd vs IO objects We support both, but IO objects are easier to use so refer to those in the documentation. commit 1ec67bc61d534232b5eec5c3f32da362898c6508 Author: Eric Wong Date: Thu May 12 19:13:57 2011 -0700 copy_stream: enough to get this working under MRI 1.8 This way at least 1.8 users can have something akin to IO.copy_stream. commit 83bdc390d98e9af4439c6db92679a9a84eb9f52a Author: Eric Wong Date: Thu May 12 18:59:44 2011 -0700 test_copy_stream: fix userspace buffering assumption And enable UNIX socket tests for this commit ec812c7f2d83681b7beecdf21334e3a43c2b7090 Author: Eric Wong Date: Thu May 12 17:25:08 2011 -0700 add copy_stream test from MRI This helps flesh out some inconsistencies between our implementation and IO.copy_stream in MRI. Some things we won't care about though, like userspace buffering. commit e887427daad73f460c1e7abbbefecc22cddbadc3 Author: Eric Wong Date: Thu May 12 17:22:57 2011 -0700 copy_stream: update src_offset on retries Oops :x commit 7dd97ae08a4c6755427a4e2162d4232cfd1d8cac Author: Eric Wong Date: Tue May 10 12:42:38 2011 -0700 copy_stream attempts to use IO::Splice::WAITALL This reduces Ruby method dispatches commit b8b2d02b56e29466a0437b4bb8e8e0608a933f89 Author: Eric Wong Date: Tue May 10 12:36:59 2011 -0700 test_io_splice: disable timeout-related tests in non-MRI timeout doesn't seem to interrupt C extensions reliably in some cases... commit 5e73ae9c477d0ba64f497f0517be20e65ba0c253 Author: Eric Wong Date: Mon May 9 17:57:10 2011 -0700 add IO::Splice::WAITALL flag support This allows splice-in-full and tee-in-full behavior to simplify user code. commit 40b985ed0a6d103f2bf123ff6c288e5617b76999 Author: Eric Wong Date: Mon May 9 13:54:54 2011 -0700 test_io_splice_eintr: beef up test Also works under Rubinius commit 7a7ea76be30e212c35132829959c0b57e5acb621 Author: Eric Wong Date: Mon May 9 13:45:28 2011 -0700 use ssize_t/size_t instead of long/unsigned long Easier to read this way since it matches upstream functions. commit c797cea2cdddbbc5534be54ac37d95d0c8af6e61 Author: Eric Wong Date: Mon May 9 13:43:39 2011 -0700 EINTR test only works under 1.9 Not that we feel like supporting 1.8 any longer.. commit 4cbd3c3ea9e251eadd74e0971b0510fc05f95aa4 Author: Eric Wong Date: Mon May 9 13:28:19 2011 -0700 detect closed descriptors on EINTR We don't want to retry with the same FD if it somehow got closed and reopened in a different thread. We could possibly have Errno::EBADF, too, but rb_thread_io_blocking_region doesn't allow multiple file descriptors... commit 184f664d0773ea41c56b9db8dcf69878b9713855 Author: Eric Wong Date: Mon May 9 13:18:42 2011 -0700 my_fileno: use FIX2INT instead of NUM2INT No chance in hell a file descriptor can be a Bignum... commit af9da960a4b2683d27c946c308ae105958abdd26 Author: Eric Wong Date: Mon May 9 13:12:25 2011 -0700 retry on EINTR This makes things consistent with Ruby core IO methods