From a72fd404e37c3b21d6fdc31c3cd30b6b4dfb9445 Mon Sep 17 00:00:00 2001 From: kris Date: Fri, 14 Oct 2005 19:15:10 +0000 Subject: Partially revert revision 1.66, which contained a change that did not correspond to the commit log. It changed the maxswzone and maxbcache parameters from int to long, without changing the extern definitions in . In fact it's a good thing it did not, because other parts of the system are not yet ready for this, and on large-memory sparc machines it causes severe filesystem damage if you try. The worst effect of the change was that the tunables controlling the above variables stopped working. These were necessary to allow such large sparc64 machines (with >12GB RAM) to boot, since sparc64 did not set a hard-coded upper limit on these parameters and they ended up overflowing an int, causing an infinite loop at boot in bufinit(). Reviewed by: mlaier --- sys/kern/subr_param.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/kern/subr_param.c') diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index ee76407..833842b 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -75,8 +75,8 @@ int maxfilesperproc; /* per-proc open files limit */ int ncallout; /* maximum # of timer events */ int nbuf; int nswbuf; -long maxswzone; /* max swmeta KVA storage */ -long maxbcache; /* max buffer cache KVA storage */ +int maxswzone; /* max swmeta KVA storage */ +int maxbcache; /* max buffer cache KVA storage */ int maxpipekva; /* Limit on pipe KVA */ u_long maxtsiz; /* max text size */ u_long dfldsiz; /* initial data size limit */ @@ -106,11 +106,11 @@ init_param1(void) #ifdef VM_SWZONE_SIZE_MAX maxswzone = VM_SWZONE_SIZE_MAX; #endif - TUNABLE_LONG_FETCH("kern.maxswzone", &maxswzone); + TUNABLE_INT_FETCH("kern.maxswzone", &maxswzone); #ifdef VM_BCACHE_SIZE_MAX maxbcache = VM_BCACHE_SIZE_MAX; #endif - TUNABLE_LONG_FETCH("kern.maxbcache", &maxbcache); + TUNABLE_INT_FETCH("kern.maxbcache", &maxbcache); maxtsiz = MAXTSIZ; TUNABLE_ULONG_FETCH("kern.maxtsiz", &maxtsiz); -- cgit v1.1