diff options
author | msmith <msmith@FreeBSD.org> | 1999-07-05 08:52:54 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1999-07-05 08:52:54 +0000 |
commit | af7615d39a0a05294c977a44b96e0abd75a0e723 (patch) | |
tree | d39acb1756b5a1342da8e9e7436ed7232c818bf1 /sys/kern/uipc_mbuf.c | |
parent | 36e6752409ff0942f4248605bd0089086ffb9dfe (diff) | |
download | FreeBSD-src-af7615d39a0a05294c977a44b96e0abd75a0e723.zip FreeBSD-src-af7615d39a0a05294c977a44b96e0abd75a0e723.tar.gz |
Move the initialisation/tuning of nmbclusters from param.c/machdep.c
into uipc_mbuf.c. This reduces three sets of identical tunable code to
one set, and puts the initialisation with the mbuf code proper.
Make NMBUFs tunable as well.
Move the nmbclusters sysctl here as well.
Move the initialisation of maxsockets from param.c to uipc_socket2.c,
next to its corresponding sysctl.
Use the new tunable macros for the kern.vm.kmem.size tunable (this should have
been in a separate commit, whoops).
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index d7e0de7..92505fb 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -31,9 +31,10 @@ * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 - * $Id: uipc_mbuf.c,v 1.39 1999/04/12 10:07:15 des Exp $ + * $Id: uipc_mbuf.c,v 1.40 1999/07/01 13:21:39 peter Exp $ */ +#include "opt_param.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/malloc.h> @@ -59,6 +60,8 @@ int max_linkhdr; int max_protohdr; int max_hdr; int max_datalen; +int nmbclusters; +int nmbufs; SYSCTL_DECL(_kern_ipc); SYSCTL_INT(_kern_ipc, KIPC_MAX_LINKHDR, max_linkhdr, CTLFLAG_RW, @@ -69,6 +72,13 @@ SYSCTL_INT(_kern_ipc, KIPC_MAX_HDR, max_hdr, CTLFLAG_RW, &max_hdr, 0, ""); SYSCTL_INT(_kern_ipc, KIPC_MAX_DATALEN, max_datalen, CTLFLAG_RW, &max_datalen, 0, ""); SYSCTL_STRUCT(_kern_ipc, KIPC_MBSTAT, mbstat, CTLFLAG_RW, &mbstat, mbstat, ""); +SYSCTL_INT(_kern_ipc, KIPC_NMBCLUSTERS, nmbclusters, CTLFLAG_RD, + &nmbclusters, 0, "Maximum number of mbuf clusters avaliable"); +#ifndef NMBCLUSTERS +#define NMBCLUSTERS (512 + MAXUSERS * 16) +#endif +TUNABLE_INT_DECL("kern.ipc.nmbclusters", NMBCLUSTERS, nmbclusters); +TUNABLE_INT_DECL("kern.ipc.nmbufs", NMBCLUSTERS * 4, nmbufs); /* XXX fixup? */ static void m_reclaim __P((void)); |