Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Subject: [PATCH] doc: recommend io_splice 4.1.1 or later
Date: Tue, 17 May 2011 17:43:59 -0700	[thread overview]
Message-ID: <20110518004359.GA21599@dcvr.yhbt.net> (raw)

I just pushed this out to rainbows.git and updated the website:

>From 5e4f790847198e1267b2fbd5decfa09e5cc3d618 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
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


                 reply	other threads:[~2011-05-18  0:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110518004359.GA21599@dcvr.yhbt.net \
    --to=normalperson-rmlxzr9ms24@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    /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/rainbows.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).