[ANN] io_splice 2.0.0 - IO::Splice.copy_stream added!

Discussion in 'Ruby' started by Eric Wong, Jun 5, 2010.

  1. Eric Wong

    Eric Wong Guest

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

    Changes:

    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).

    --
    Eric Wong
     
    Eric Wong, Jun 5, 2010
    #1
    1. Advertising

  2. Eric Wong

    Eric Wong Guest

    [ANN] io_splice 2.0.0 - IO::Splice.copy_stream fixes

    * http://bogomips.org/ruby_io_splice/
    *
    * git://git.bogomips.org/ruby_io_splice.git

    Changes:

    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/

    --
    Eric Wong
     
    Eric Wong, Jun 6, 2010
    #2
    1. Advertising

  3. Eric Wong

    Eric Wong Guest

    [ANN] io_splice 2.1.0 - IO::Splice.copy_stream fixes

    Eric Wong <> wrote:
    > * http://bogomips.org/ruby_io_splice/
    > *
    > * git://git.bogomips.org/ruby_io_splice.git
    >
    > Changes:


    Oops, I screwed up the Subject: line in the original announcement.

    I also just tried this release under Rubinius and it works as of
    Rubinius commit db6ea50cacb1b2b246ee445f03ae4ffec3015a07. I
    even found a bug in my test cases triggered by Rubinius, but
    the actual library works fine.

    --
    Eric Wong
     
    Eric Wong, Jun 24, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Wong
    Replies:
    0
    Views:
    105
    Eric Wong
    Feb 15, 2010
  2. Eric Wong
    Replies:
    0
    Views:
    92
    Eric Wong
    May 27, 2010
  3. Eric Wong
    Replies:
    0
    Views:
    103
    Eric Wong
    Aug 2, 2010
  4. Eric Wong
    Replies:
    1
    Views:
    221
    Avdi Grimm
    Mar 3, 2011
  5. Eric Wong
    Replies:
    0
    Views:
    100
    Eric Wong
    May 1, 2011
Loading...

Share This Page