Re: Is sendfile all that sexy?

Ion Badulescu (ionut@moisil.cs.columbia.edu)
Mon, 22 Jan 2001 14:04:35 -0800


On Mon, 22 Jan 2001 12:01:23 -0800 (PST), David Lang <dlang@diginsite.com> wrote:
> how about always_defragment (or whatever the option is now called) so that
> your routing box always reassembles packets and then fragments them to the
> correct size for the next segment? wouldn't this do the job?

It doesn't help with TCP, because the negotiated MSS will always be 1500
and thus there won't be any fragments to re-assemble.

> On Mon, 22 Jan 2001, Val Henson wrote:
>
>> Well, there is a (real-world) case where your TCP proxy doesn't want
>> to look at the data and you can't use IP forwarding. If you have TCP
>> connections between networks that have very different MTU's, using IP
>> forwarding will result in tiny packets on the large MTU networks.

There is another real-world case: a load-balancing proxy. socket->socket
sendfile would allow the proxy to open a non-keepalive connection to the
backend server, send the request, and then just link the two sockets
together using sendfile.

Of course, some changes would have to be made to the API. An asynchronous
sendsocket()/sendfile() system call would be just lovely, in fact. :-)

Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/