diff options
author | David Greenman <dg@FreeBSD.org> | 1998-11-05 14:28:26 +0000 |
---|---|---|
committer | David Greenman <dg@FreeBSD.org> | 1998-11-05 14:28:26 +0000 |
commit | dd0b2081f452c0339a44a9647866cf9990111086 (patch) | |
tree | 6c47ddd745fbd2190cca47058f3d1b13abcf416c /sys/kern/subr_param.c | |
parent | 624bb2d1c1abc886d90c7228968b025544d1e71c (diff) | |
download | src-dd0b2081f452c0339a44a9647866cf9990111086.tar.gz src-dd0b2081f452c0339a44a9647866cf9990111086.zip |
Implemented zero-copy TCP/IP extensions via sendfile(2) - send a
file to a stream socket. sendfile(2) is similar to implementations in
HP-UX, Linux, and other systems, but the API is more extensive and
addresses many of the complaints that the Apache Group and others have
had with those other implementations. Thanks to Marc Slemko of the
Apache Group for helping me work out the best API for this.
Anyway, this has the "net" result of speeding up sends of files over
TCP/IP sockets by about 10X (that is to say, uses 1/10th of the CPU
cycles) when compared to a traditional read/write loop.
Notes
Notes:
svn path=/head/; revision=40931
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r-- | sys/kern/subr_param.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index 454298416c6f..6736b9688de2 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.c 8.3 (Berkeley) 8/20/94 - * $Id: param.c,v 1.29 1998/06/30 21:25:35 phk Exp $ + * $Id: param.c,v 1.30 1998/07/11 13:06:38 bde Exp $ */ #include "opt_sysvipc.h" @@ -95,6 +95,12 @@ int maxsockets = MAXSOCKETS; /* allocate 1/4th amount of virtual address space for mbufs XXX */ int nmbufs = NMBCLUSTERS * 4; +/* maximum # of sf_bufs (sendfile(2) zero-copy virtual buffers) */ +#ifndef NSFBUFS +#define NSFBUFS (512 + MAXUSERS * 16) +#endif +int nsfbufs = NSFBUFS; + /* * Values in support of System V compatible shared memory. XXX */ |