From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.io-splice.general Subject: [ANN] io_splice 3.0.0 - kinder, gentler Linux zero-copy Date: Tue, 1 Mar 2011 09:42:03 +0000 Message-ID: <20110301094203.GA13218@dcvr.yhbt.net> References: <20110301094203.GA13218@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1298972550 20528 80.91.229.12 (1 Mar 2011 09:42:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Mar 2011 09:42:30 +0000 (UTC) To: ruby.io.splice@librelist.com Original-X-From: ruby.io.splice@librelist.com Tue Mar 01 10:42:26 2011 Return-path: Envelope-to: gclrig-ruby.io.splice@m.gmane.org In-Reply-To: <20110301094203.GA13218@dcvr.yhbt.net> List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: ruby.io.splice@librelist.com Xref: news.gmane.org gmane.comp.lang.ruby.io-splice.general:26 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PuM66-0005xb-8i for gclrig-ruby.io.splice@m.gmane.org; Tue, 01 Mar 2011 10:42:26 +0100 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 8805D21C6BD for ; Tue, 1 Mar 2011 09:42:24 +0000 (UTC) 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: 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. -- Eric Wong