xref: /csrg-svn/sys/conf/param.c (revision 15825)
1*15825Smckusick /*	param.c	6.3	84/01/09	*/
23124Swnj 
33124Swnj #include "../h/param.h"
43124Swnj #include "../h/systm.h"
54668Swnj #include "../h/socket.h"
63124Swnj #include "../h/dir.h"
73124Swnj #include "../h/user.h"
83124Swnj #include "../h/proc.h"
93124Swnj #include "../h/text.h"
103124Swnj #include "../h/inode.h"
113124Swnj #include "../h/file.h"
123124Swnj #include "../h/callout.h"
133124Swnj #include "../h/clist.h"
143124Swnj #include "../h/cmap.h"
154824Swnj #include "../h/mbuf.h"
1615802Smckusick #include "../h/nami.h"
177638Ssam #include "../h/quota.h"
188229Sroot #include "../h/kernel.h"
193124Swnj /*
203124Swnj  * System parameter formulae.
213124Swnj  *
223124Swnj  * This file is copied into each directory where we compile
233124Swnj  * the kernel; it should be modified there to suit local taste
243124Swnj  * if necessary.
253124Swnj  *
263124Swnj  * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
273124Swnj  */
283124Swnj 
298229Sroot #define	HZ 100
303124Swnj int	hz = HZ;
318229Sroot int	tick = 1000000 / HZ;
328229Sroot struct	timezone tz = { TIMEZONE, DST };
333124Swnj #define	NPROC (20 + 8 * MAXUSERS)
343124Swnj int	nproc = NPROC;
3514048Ssam #ifdef INET
3614048Ssam #define	NETSLOP	20			/* for all the lousy servers*/
3714048Ssam #else
3814048Ssam #define	NETSLOP	0
3914048Ssam #endif
40*15825Smckusick #define NCHSIZE (60 + 2 * MAXUSERS)
41*15825Smckusick int	nchsize = NCHSIZE;
4214048Ssam int	ntext = 24 + MAXUSERS + NETSLOP;
43*15825Smckusick int	ninode = (NPROC + 16 + MAXUSERS + (2 * NCHSIZE / 3)) + 32;
4414048Ssam int	nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32 + 2 * NETSLOP;
459248Ssam int	ncallout = 16 + NPROC;
463124Swnj int	nclist = 100 + 16 * MAXUSERS;
473620Sroot int	nport = NPROC / 2;
485148Swnj int     nmbclusters = NMBCLUSTERS;
499183Ssam #ifdef QUOTA
507638Ssam int	nquota = (MAXUSERS * 9)/7 + 3;
517638Ssam int	ndquot = (MAXUSERS*NMOUNT)/4 + NPROC;
527638Ssam #endif
533124Swnj 
543124Swnj /*
553124Swnj  * These are initialized at bootstrap time
563124Swnj  * to values dependent on memory size
573124Swnj  */
583124Swnj int	nbuf, nswbuf;
593124Swnj 
603124Swnj /*
613124Swnj  * These have to be allocated somewhere; allocating
623124Swnj  * them here forces loader errors if this file is omitted.
633124Swnj  */
643124Swnj struct	proc *proc, *procNPROC;
653124Swnj struct	text *text, *textNTEXT;
663124Swnj struct	inode *inode, *inodeNINODE;
673124Swnj struct	file *file, *fileNFILE;
683124Swnj struct 	callout *callout;
693124Swnj struct	cblock *cfree;
703124Swnj struct	buf *buf, *swbuf;
713124Swnj short	*swsize;
723124Swnj int	*swpf;
733124Swnj char	*buffers;
743124Swnj struct	cmap *cmap, *ecmap;
7515802Smckusick struct	nch *nch;
769183Ssam #ifdef QUOTA
777638Ssam struct	quota *quota, *quotaNQUOTA;
787638Ssam struct	dquot *dquot, *dquotNDQUOT;
797638Ssam #endif
80