summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-11-05 14:28:26 +0000
committerdg <dg@FreeBSD.org>1998-11-05 14:28:26 +0000
commitb178f74f12a0446656640ae873e0bc71057f5de3 (patch)
treed66b2ab9c599863a9679de94cdc9514d6a3dbd1d /sys/conf
parent60b560b337fe2a6159e49741372219aa0353da03 (diff)
downloadFreeBSD-src-b178f74f12a0446656640ae873e0bc71057f5de3.zip
FreeBSD-src-b178f74f12a0446656640ae873e0bc71057f5de3.tar.gz
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.
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/options3
-rw-r--r--sys/conf/param.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/conf/options b/sys/conf/options
index 65e1f8b..a664af2 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -1,4 +1,4 @@
-# $Id: options,v 1.105 1998/10/12 12:27:23 bde Exp $
+# $Id: options,v 1.106 1998/10/28 08:37:10 dfr Exp $
#
# On the handling of kernel options
#
@@ -130,6 +130,7 @@ MSGSSZ opt_param.h
MSGTQL opt_param.h
NBUF opt_param.h
NMBCLUSTERS opt_param.h
+NSFBUFS opt_param.h
SEMMAP opt_param.h
SEMMNI opt_param.h
SEMMNS opt_param.h
diff --git a/sys/conf/param.c b/sys/conf/param.c
index 4542984..6736b96 100644
--- a/sys/conf/param.c
+++ b/sys/conf/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
*/
OpenPOWER on IntegriCloud