Re: [Fwd: [Fwd: Is sendfile all that sexy? (fwd)]]
Jamie Lokier (lk@tantalophile.demon.co.uk)
Thu, 25 Jan 2001 18:58:16 +0100
Ingo Molnar wrote:
> this is what TUX uses. When a eg. static HTTP request arrives it sends
> reply headers shortly after having checked file permissions and stuff (but
> the file is not yet sent), with MSG_MORE set. Then it sends the file, and
> sendfile() keeps MSG_MORE set right until the end of the request, when it
> clears it for the last fragment so the last partial packet gets flushed to
> the network. In fact there is one more optimization here, if the request
> is not keepalive then TUX still kees MSG_MORE set, and closes the socket -
> which will implicitly flush the output queue anyway and send any partial
> packet, but will also have the FIN packet merged with the last outgoing
> packet.
... is it possible to do control the MSG_MORE flag for sendfile's final
packet from user space, or do you have to use TCP_CORK to get the control?
-- Jamie
-
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/