Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Feb 2001 10:54:10 -0800
From:      David Greenman <dg@root.com>
To:        Tony Finch <dot@dotat.at>
Cc:        Kris Kennaway <kris@obsecurity.org>, bsddiy <bsddiy@163.net>, freebsd-net@FreeBSD.ORG
Subject:   Re: sendfile() 
Message-ID:  <200102011854.KAA24065@implode.root.com>
In-Reply-To: Your message of "Thu, 01 Feb 2001 18:00:10 GMT." <20010201180010.Q70673@hand.dotat.at> 

next in thread | previous in thread | raw e-mail | index | archive | help
>Kris Kennaway <kris@obsecurity.org> wrote:
>>On Thu, Feb 01, 2001 at 01:31:39PM +0800, bsddiy wrote:
>>
>>> I don't want to bring flame war, but the following Linus' words may
>>> be right:
>>
>>Did you have a point to make here? If so, I missed it.
>
>I've been discussing this with a few people recently (fortunately I
>didn't lose the mail from Linus when my laptop was stolen) after I
>stumbled across the TCP_NOPUSH option, which is superficially similar
>to TCP_CORK.
>
>Linus's argument against the HP/UX and BSD sendfile() is that, for
>example, in the presence of pipelined HTTP requests it isn't possible
>to avoid poor packet boundaries between responses. TCP_NOPUSH does
>help to solve this problem (it was designed to hack around problems
>with the interaction between mbuf sizes and sosend and tcp_output) but
>it introduces a new problem: at the end of a chain of HTTP responses
>you want the last segment to go out quickly rather than waiting for
>more data to fill the segment. For this reason turning off TCP_CORK
>pushes out queued data, but this isn't the case for TCP_NOPUSH.

   Thanks for the above - at least now I have something to comment on! If that
is really Linus' argument "against" FreeBSD's sendfile(), then that's not an
argument against it since any response aggregation should happen in the network
stack and not at the sendfile() level.
   Linus is right about one thing, though: I've never heard of "TCP_CORK" and
have very little idea of what it is supposed to do. The Linux sendfile() API
was only looked at very superficially and I found it to be sorely lacking at
the time. ...but unlike Linus about FreeBSD, I've never publically said that
Linus or his team are idiots because of it, despite what I may think sometimes.
That should count for something. :-)

-DG

David Greenman
Co-founder, The FreeBSD Project - http://www.freebsd.org
President, TeraSolutions, Inc. - http://www.terasolutions.com
Pave the road of life with opportunities.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102011854.KAA24065>