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: AS14383 205.234.109.0/24 X-Spam-Status: No, score=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: [PATCH] doc: recommend io_splice 4.1.1 or later Date: Tue, 17 May 2011 17:43:59 -0700 Message-ID: <20110518004359.GA21599@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 1305680169 29685 80.91.229.12 (18 May 2011 00:56:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 May 2011 00:56:09 +0000 (UTC) To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Wed May 18 02:56:05 2011 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:252 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QMV3U-0002K7-Eo for gclrrg-rainbows-talk@m.gmane.org; Wed, 18 May 2011 02:56:04 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id F2A3B18583A6; Tue, 17 May 2011 20:55:58 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 75BBE18583A6 for ; Tue, 17 May 2011 20:44:00 -0400 (EDT) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7AFDE2EE263; Wed, 18 May 2011 00:43:59 +0000 (UTC) I just pushed this out to rainbows.git and updated the website: >>From 5e4f790847198e1267b2fbd5decfa09e5cc3d618 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 May 2011 17:38:12 -0700 Subject: [PATCH] doc: recommend io_splice 4.1.1 or later io_splice 4.1.1 works around issues with socket buffers filling up pipe buffers on blocking splice. See http://lkml.org/lkml/2009/1/13/478 for a better explanation. --- lib/rainbows/configurator.rb | 4 +++- t/test_isolate.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rainbows/configurator.rb b/lib/rainbows/configurator.rb index a1d90cb..1b93fc7 100644 --- a/lib/rainbows/configurator.rb +++ b/lib/rainbows/configurator.rb @@ -190,7 +190,9 @@ module Rainbows::Configurator # end # # Keep in mind that splice(2) itself is a relatively new system call - # and has been buggy in many older Linux kernels. + # and has been buggy in many older Linux kernels. If you're proxying + # the output of sockets to the client, be sure to use "io_splice" + # 4.1.1 or later to avoid stalling responses. # # Default: IO on Ruby 1.9+, false otherwise def copy_stream(klass) diff --git a/t/test_isolate.rb b/t/test_isolate.rb index fe2aebc..562f1b6 100644 --- a/t/test_isolate.rb +++ b/t/test_isolate.rb @@ -41,7 +41,7 @@ Isolate.now!(opts) do gem 'sleepy_penguin', '2.0.0' # is 2.6.32 new enough? - gem 'io_splice', '4.1.0' if `uname -r`.strip > '2.6.32' + gem 'io_splice', '4.1.1' if `uname -r`.strip > '2.6.32' end end -- Eric Wong _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying