httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@ibm.net>
Subject Re: [PATCH] ap_sendfile on Linux gets EINVAL
Date Mon, 17 Jul 2000 19:32:21 GMT
> Date: Mon, 17 Jul 2000 14:47:47 -0400
> From: Greg Ames <gregames@raleigh.ibm.com>
> 
> Jeff Trawick wrote:
> > 
> > > +    }
> > > +    rv = setsockopt(sock->socketdes, SOL_TCP, TCP_CORK,
> > > +                    (const void *) &corkflag, sizeof(corkflag));
> > 
> > If this fails, why do we give a !@#$ beyond avoiding the uncork call?
> 
> This is a "should not occur" - ap_sendfile bails if os_cork returns
> a negative value.  

To clarify:  I'm presenting the idea that we shouldn't fail
ap_sendfile() if enabling TCP_CORK fails.  If the socket is fubar, the
sendfile() will fail anyway.  If the socket is not fubar, then we must
have run into some other mutually exclusive socket setting which we
don't know how to back out (or even if we should back it out).  I'm
not hung up on the behavior either way, but I think it is worth
thinking about briefly.

> > > +        /* restore TCP_NODELAY to its original setting */
> > 
> > What if you didn't have to change TCP_NODELAY to begin with (i.e.,
> > original setting was off)?  Don't turn it off again.
> > 
> > > +        rv = setsockopt(sock->socketdes, SOL_TCP, TCP_NODELAY,
> > > +                    (const void *) &delayflag, sizeof(delayflag));
> 
> It works either way.  I'm optimizing for the normal case in production, where TCP_NODELAY
> is set.  It happens to be broken at the moment, but it's a simple
> fix.  Patch forthcoming.

Oh, no...  don't tell me that you're being [pause] !!!!!!!!APACHE-CENTRIC!!!!!!!!!

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Mime
View raw message