diff options
author | dg <dg@FreeBSD.org> | 1995-05-25 07:36:24 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-05-25 07:36:24 +0000 |
commit | 50c29dc74f0ad2c79d20bd9b79c049ebd18dbee9 (patch) | |
tree | 359425d34d018891b513b01b4c248af3282086ad /sys/conf/param.c | |
parent | 170f7e32218e96354b95caf104821881c07572c0 (diff) | |
download | FreeBSD-src-50c29dc74f0ad2c79d20bd9b79c049ebd18dbee9.zip FreeBSD-src-50c29dc74f0ad2c79d20bd9b79c049ebd18dbee9.tar.gz |
Made "NMBCLUSTERS" calculation dynamic and fixed bogus use of "NMBCLUSTERS"
in machdep.c (it should use the global nmbclusters). Moved the calculation
of nmbclusters into conf/param.c (same place where nmbclusters has always
been assigned), and made the calculation include an extra amount based
on "maxusers". NMBCLUSTERS can still be overrided in the kernel config
file as always, but this change will make that generally unnecessary. This
fixes the "bug" reports from people who have misconfigured kernels seeing
the network "hang" when the mbuf cluster pool runs out.
Reviewed by: John Dyson
Diffstat (limited to 'sys/conf/param.c')
-rw-r--r-- | sys/conf/param.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/conf/param.c b/sys/conf/param.c index aa2a18f..aef4374 100644 --- a/sys/conf/param.c +++ b/sys/conf/param.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.c 8.2 (Berkeley) 1/21/94 - * $Id: param.c,v 1.7 1995/02/16 11:29:19 joerg Exp $ + * $Id: param.c,v 1.8 1995/02/20 19:42:19 guido Exp $ */ #include <sys/param.h> @@ -84,9 +84,20 @@ struct timezone tz = { TIMEZONE, DST }; int maxproc = NPROC; /* maximum # of processes */ int maxprocperuid = NPROC-1; /* maximum # of processes per user */ int maxfiles = NPROC*2; /* system wide open files limit */ -int maxfilesperproc = NPROC*2; /* system wide open files limit */ +int maxfilesperproc = NPROC*2; /* per-process open files limit */ int ncallout = 16 + NPROC; /* maximum # of timer events */ + +/* maximum # of mbuf clusters */ +#ifndef NMBCLUSTERS +#ifdef GATEWAY +int nmbclusters = 512 + MAXUSERS * 16; +#else +int nmbclusters = 256 + MAXUSERS * 16; +#endif /* GATEWAY */ +#else int nmbclusters = NMBCLUSTERS; +#endif + int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */ /* |