]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rewrite sendfile's header support so that headers are now sent in the first
authorMike Silbersack <silby@FreeBSD.org>
Sun, 1 Feb 2004 07:56:44 +0000 (07:56 +0000)
committerMike Silbersack <silby@FreeBSD.org>
Sun, 1 Feb 2004 07:56:44 +0000 (07:56 +0000)
commitbeb699c7ba3f23bef2c5971aa3e11a774b60afd1
tree756eb5d016933d260c886eb87ddce614194e5d5f
parentf2f51f8ab8485fe2edf7c5d0d4aac947dbf5c669
Rewrite sendfile's header support so that headers are now sent in the first
packet along with data, instead of in their own packet.  When serving files
of size (packetsize - headersize) or smaller, this will result in one less
packet crossing the network.  Quick testing with thttpd and http_load has
shown a noticeable performance improvement in this case (350 vs 330 fetches
per second.)

Included in this commit are two support routines, iov_to_uio, and m_uiotombuf;
these routines are used by sendfile to construct the header mbuf chain that
will be linked to the rest of the data in the socket buffer.
sys/kern/kern_subr.c
sys/kern/uipc_mbuf.c
sys/kern/uipc_syscalls.c
sys/sys/uio.h