From: Eric Wong <normalperson@yhbt.net>
To: ruby.io.splice@librelist.com
Subject: Re: [RFC] try* interfaces in io_splice 2.2.0.18.g3025
Date: Mon, 28 Feb 2011 01:25:54 +0000 [thread overview]
Message-ID: <20110228012554.GA31228@dcvr.yhbt.net> (raw)
In-Reply-To: 20110228011950.GA31141@dcvr.yhbt.net
Eric Wong <normalperson@yhbt.net> wrote:
> There is no IO.tryvmsplice, I haven't figured out if IO.vmsplice is
> useful or not and non-blocking I/O with iovecs is so painful to deal
> with it's not worth it.
Just pushed this out, too:
diff --git a/ext/io_splice/io_splice_ext.c b/ext/io_splice/io_splice_ext.c
index dc1e74d..a0ba381 100644
--- a/ext/io_splice/io_splice_ext.c
+++ b/ext/io_splice/io_splice_ext.c
@@ -394,7 +394,14 @@ static void advance_vmsplice_args(struct vmsplice_args *a, long n)
* +fd+ must be the writable end of a pipe.
*
* This may allow the kernel to avoid data copies in some cases.
- * but is (probably) of limited usefulness in Ruby.
+ * but is (probably) of limited usefulness in Ruby. If you have
+ * use cases or ideas for making this more useful for Ruby users,
+ * please tell us at ruby.io.splice@librelist.com!
+ *
+ * Also consider the "sendfile" RubyGem or IO.copy_stream in Ruby 1.9
+ * if you want to do zero-copy file transfers to pipes or sockets. As
+ * of Linux 2.6.33, sendfile(2) can copy to any output descriptor,
+ * not just sockets.
*
* See manpage for full documentation:
* http://kernel.org/doc/man-pages/online/pages/man2/vmsplice.2.html
--
Eric Wong
prev parent reply other threads:[~2011-02-28 1:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 1:19 [RFC] try* interfaces in io_splice 2.2.0.18.g3025 Eric Wong
2011-02-28 1:25 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/ruby_io_splice/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110228012554.GA31228@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=ruby.io.splice@librelist.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/ruby_io_splice.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).