xref: /csrg-svn/sys/conf/param.c (revision 8229)
1*8229Sroot /*	param.c	4.14	82/09/18	*/
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"
167638Ssam #include "../h/quota.h"
17*8229Sroot #include "../h/kernel.h"
183124Swnj /*
193124Swnj  * System parameter formulae.
203124Swnj  *
213124Swnj  * This file is copied into each directory where we compile
223124Swnj  * the kernel; it should be modified there to suit local taste
233124Swnj  * if necessary.
243124Swnj  *
253124Swnj  * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
263124Swnj  */
273124Swnj 
28*8229Sroot #define	HZ 100
293124Swnj int	hz = HZ;
30*8229Sroot int	tick = 1000000 / HZ;
31*8229Sroot struct	timezone tz = { TIMEZONE, DST };
323124Swnj #define	NPROC (20 + 8 * MAXUSERS)
333124Swnj int	nproc = NPROC;
343124Swnj int	ntext = 24 + MAXUSERS;
353463Sroot int	ninode = (NPROC + 16 + MAXUSERS) + 32;
366469Swnj int	nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
373124Swnj int	ncallout = 16 + MAXUSERS;
383124Swnj int	nclist = 100 + 16 * MAXUSERS;
393620Sroot int	nport = NPROC / 2;
405148Swnj int     nmbclusters = NMBCLUSTERS;
417638Ssam #if	QUOTA
427638Ssam int	nquota = (MAXUSERS * 9)/7 + 3;
437638Ssam int	ndquot = (MAXUSERS*NMOUNT)/4 + NPROC;
447638Ssam #endif
453124Swnj 
463124Swnj /*
473124Swnj  * These are initialized at bootstrap time
483124Swnj  * to values dependent on memory size
493124Swnj  */
503124Swnj int	nbuf, nswbuf;
513124Swnj 
523124Swnj /*
533124Swnj  * These have to be allocated somewhere; allocating
543124Swnj  * them here forces loader errors if this file is omitted.
553124Swnj  */
563124Swnj struct	proc *proc, *procNPROC;
573124Swnj struct	text *text, *textNTEXT;
583124Swnj struct	inode *inode, *inodeNINODE;
593124Swnj struct	file *file, *fileNFILE;
603124Swnj struct 	callout *callout;
613124Swnj struct	cblock *cfree;
623124Swnj struct	buf *buf, *swbuf;
633124Swnj short	*swsize;
643124Swnj int	*swpf;
653124Swnj char	*buffers;
663124Swnj struct	cmap *cmap, *ecmap;
677638Ssam #if	QUOTA
687638Ssam struct	quota *quota, *quotaNQUOTA;
697638Ssam struct	dquot *dquot, *dquotNDQUOT;
707638Ssam #endif
71