httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject PATCH: lazy initialization of TCP_NODELAY (workaround for 2.6 TCP_CORK problem)
Date Fri, 26 Aug 2005 07:42:19 GMT
The attached patch delays the setting of TCP_NODELAY on client  
until the first time core_output_filter has to do a writev_it_all()  
or emulate_sendfile().
My motivation for this is to work around the TCP_NODELAY/TCP_CORK  
in Linux 2.6.  However, it also will save a couple of syscalls for  
any request that
is handled with sendfile(2).

Note that there was an APR bug that caused TCP_NODELAY to be set on the
listener socket at startup as a side-effect of TCP_DEFER_ACCEPT being  
I just committed a fix for this.  Without that fix, Linux 2.6 systems  
using this httpd
patch will still exhibit the corking problem.

Can a couple of volunteers please test and/or review this patch?  I'd  
a second opinion before I commit, given the subtlety of the NODELAY  
and CORK
semantics on various platforms.


View raw message