xref: /csrg-svn/sys/conf/param.c (revision 14048)
1*14048Ssam /*	param.c	4.18	83/07/21	*/
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"
178229Sroot #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 
288229Sroot #define	HZ 100
293124Swnj int	hz = HZ;
308229Sroot int	tick = 1000000 / HZ;
318229Sroot struct	timezone tz = { TIMEZONE, DST };
323124Swnj #define	NPROC (20 + 8 * MAXUSERS)
333124Swnj int	nproc = NPROC;
34*14048Ssam #ifdef INET
35*14048Ssam #define	NETSLOP	20			/* for all the lousy servers*/
36*14048Ssam #else
37*14048Ssam #define	NETSLOP	0
38*14048Ssam #endif
39*14048Ssam int	ntext = 24 + MAXUSERS + NETSLOP;
403463Sroot int	ninode = (NPROC + 16 + MAXUSERS) + 32;
41*14048Ssam int	nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32 + 2 * NETSLOP;
429248Ssam int	ncallout = 16 + NPROC;
433124Swnj int	nclist = 100 + 16 * MAXUSERS;
443620Sroot int	nport = NPROC / 2;
455148Swnj int     nmbclusters = NMBCLUSTERS;
469183Ssam #ifdef QUOTA
477638Ssam int	nquota = (MAXUSERS * 9)/7 + 3;
487638Ssam int	ndquot = (MAXUSERS*NMOUNT)/4 + NPROC;
497638Ssam #endif
503124Swnj 
513124Swnj /*
523124Swnj  * These are initialized at bootstrap time
533124Swnj  * to values dependent on memory size
543124Swnj  */
553124Swnj int	nbuf, nswbuf;
563124Swnj 
573124Swnj /*
583124Swnj  * These have to be allocated somewhere; allocating
593124Swnj  * them here forces loader errors if this file is omitted.
603124Swnj  */
613124Swnj struct	proc *proc, *procNPROC;
623124Swnj struct	text *text, *textNTEXT;
633124Swnj struct	inode *inode, *inodeNINODE;
643124Swnj struct	file *file, *fileNFILE;
653124Swnj struct 	callout *callout;
663124Swnj struct	cblock *cfree;
673124Swnj struct	buf *buf, *swbuf;
683124Swnj short	*swsize;
693124Swnj int	*swpf;
703124Swnj char	*buffers;
713124Swnj struct	cmap *cmap, *ecmap;
729183Ssam #ifdef QUOTA
737638Ssam struct	quota *quota, *quotaNQUOTA;
747638Ssam struct	dquot *dquot, *dquotNDQUOT;
757638Ssam #endif
76