public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: lkml@pengaru.com
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Honoring SO_RCVLOWAT in proto_ops.poll methods
Date: Sun, 21 Sep 2008 17:09:26 -0500	[thread overview]
Message-ID: <20080921220926.GA18569@fc6222126.aspadmin.net> (raw)
In-Reply-To: <20080921211337.74e8f1f1@lxorguk.ukuu.org.uk>

On Sun, Sep 21, 2008 at 09:13:37PM +0100, Alan Cox wrote:
> Thats a gloriously insane way of trying to do HTTP/1.1, and one I'm not
> sure is actually viable in the real world because the TCP window may be
> smaller than the number of bytes required to find a Host: header - so you
> may simply not be able to receive it via MSG_PEEK. In particular mobile
> phone gateways have a nasty habit of using very small windows.
> 
> > I just don't see a good solution for what I'm doing other than MSG_PEEK
> > and SO_RCVLOWAT, any ideas?
> 
> I don't either, and while I don't agree that what you are doing for
> HTTP/1.1 is remotely sane there are probably other cases this would be
> both sane and useful which does suggest fixing it would be beneficial

I somewhat agree that it's insane, but it should be possible and what I've
done already works most of the time.  With some additional special handling
of the missing Host: case what I have might be a viable general case
solution.

For now httpx just drops the connection when Host: isn't found as it's a
work in progress.  I wanted to get this out there largely for you guys to
see "Hey maybe there's a practical need for MSG_PEEK & SO_RCVLOWAT behaving
differently than it does".  It seems to have been effective in this
respect and I am hugely appreciative of your attention, time, and input.
 
As a proof of concept httpx already has some people scratching their heads
because name-based vhosting can be a nightmare with the venerable Apache.  A
solution like mine could alleviate alot of that.  With some work and a way
to sleep on peek with a rcvbuf < rcvlowat there might be something quite
interesting for the web hosting world.

Cheers,
Vito Caputo


--------------------------------------------------------------------------------
For those of you on the list:  I had replied to Alan directly but since
Alan CC'd the list in his response I've continued with that format.  For
those of you in the dark, httpx is my insane app using the MSG_PEEK and
SO_RCVLOWAT being referred to above, you can find it here:
http://serverkit.org/modules/httpx/

  reply	other threads:[~2008-09-21 22:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-20 21:42 Honoring SO_RCVLOWAT in proto_ops.poll methods lkml
2008-09-20 22:21 ` David Miller
2008-09-20 23:00   ` lkml
2008-09-21  9:24     ` lkml
2008-09-21 14:18       ` Alan Cox
     [not found]         ` <20080921145134.GT2761@fc6222126.aspadmin.net>
2008-09-21 20:13           ` Alan Cox
2008-09-21 22:09             ` lkml [this message]
2008-10-05 20:27               ` David Miller
2008-10-05 21:45                 ` swivel
2008-10-05 22:30                   ` David Miller
2008-10-06  5:17                     ` lkml
2008-10-06 17:18                       ` David Miller
2008-10-06 17:45                         ` David Miller
2008-10-13  7:34                     ` David Miller
2008-10-13  8:32                       ` swivel
2008-10-13  9:58                         ` David Miller
2008-10-20  3:58                           ` swivel
2008-10-20  4:25                             ` David Miller
2008-11-05 11:36                             ` David Miller
2008-09-22 12:15             ` David Miller

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

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

  git send-email \
    --in-reply-to=20080921220926.GA18569@fc6222126.aspadmin.net \
    --to=lkml@pengaru.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox