xref: /csrg-svn/sys/conf/param.c (revision 15802)
1*15802Smckusick /*	param.c	6.2	84/01/03	*/
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"
16*15802Smckusick #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
4014048Ssam int	ntext = 24 + MAXUSERS + NETSLOP;
413463Sroot int	ninode = (NPROC + 16 + MAXUSERS) + 32;
4214048Ssam int	nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32 + 2 * NETSLOP;
439248Ssam int	ncallout = 16 + NPROC;
443124Swnj int	nclist = 100 + 16 * MAXUSERS;
453620Sroot int	nport = NPROC / 2;
465148Swnj int     nmbclusters = NMBCLUSTERS;
47*15802Smckusick int	nchsize = 60 + 3 * MAXUSERS;
489183Ssam #ifdef QUOTA
497638Ssam int	nquota = (MAXUSERS * 9)/7 + 3;
507638Ssam int	ndquot = (MAXUSERS*NMOUNT)/4 + NPROC;
517638Ssam #endif
523124Swnj 
533124Swnj /*
543124Swnj  * These are initialized at bootstrap time
553124Swnj  * to values dependent on memory size
563124Swnj  */
573124Swnj int	nbuf, nswbuf;
583124Swnj 
593124Swnj /*
603124Swnj  * These have to be allocated somewhere; allocating
613124Swnj  * them here forces loader errors if this file is omitted.
623124Swnj  */
633124Swnj struct	proc *proc, *procNPROC;
643124Swnj struct	text *text, *textNTEXT;
653124Swnj struct	inode *inode, *inodeNINODE;
663124Swnj struct	file *file, *fileNFILE;
673124Swnj struct 	callout *callout;
683124Swnj struct	cblock *cfree;
693124Swnj struct	buf *buf, *swbuf;
703124Swnj short	*swsize;
713124Swnj int	*swpf;
723124Swnj char	*buffers;
733124Swnj struct	cmap *cmap, *ecmap;
74*15802Smckusick struct	nch *nch;
759183Ssam #ifdef QUOTA
767638Ssam struct	quota *quota, *quotaNQUOTA;
777638Ssam struct	dquot *dquot, *dquotNDQUOT;
787638Ssam #endif
79