xref: /csrg-svn/sys/conf/param.c (revision 17557)
1*17557Skarels /*	param.c	6.8	84/12/20	*/
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;
31*17557Skarels int	tickadj = 1000000 / HZ / 10;
328229Sroot struct	timezone tz = { TIMEZONE, DST };
333124Swnj #define	NPROC (20 + 8 * MAXUSERS)
343124Swnj int	nproc = NPROC;
3516575Ssam int	ntext = 24 + MAXUSERS;
3616660Smckusick #define NINODE ((NPROC + 16 + MAXUSERS) + 32)
3716660Smckusick int	ninode = NINODE;
3816660Smckusick int	nchsize = NINODE * 11 / 10;
3916575Ssam int	nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
409248Ssam int	ncallout = 16 + NPROC;
413124Swnj int	nclist = 100 + 16 * MAXUSERS;
423620Sroot int	nport = NPROC / 2;
435148Swnj int     nmbclusters = NMBCLUSTERS;
449183Ssam #ifdef QUOTA
4517009Smckusick int	nquota = (MAXUSERS * 9) / 7 + 3;
4617009Smckusick int	ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
477638Ssam #endif
483124Swnj 
493124Swnj /*
503124Swnj  * These are initialized at bootstrap time
513124Swnj  * to values dependent on memory size
523124Swnj  */
533124Swnj int	nbuf, nswbuf;
543124Swnj 
553124Swnj /*
563124Swnj  * These have to be allocated somewhere; allocating
573124Swnj  * them here forces loader errors if this file is omitted.
583124Swnj  */
593124Swnj struct	proc *proc, *procNPROC;
603124Swnj struct	text *text, *textNTEXT;
613124Swnj struct	inode *inode, *inodeNINODE;
623124Swnj struct	file *file, *fileNFILE;
633124Swnj struct 	callout *callout;
643124Swnj struct	cblock *cfree;
653124Swnj struct	buf *buf, *swbuf;
663124Swnj short	*swsize;
673124Swnj int	*swpf;
683124Swnj char	*buffers;
693124Swnj struct	cmap *cmap, *ecmap;
7015802Smckusick struct	nch *nch;
719183Ssam #ifdef QUOTA
727638Ssam struct	quota *quota, *quotaNQUOTA;
737638Ssam struct	dquot *dquot, *dquotNDQUOT;
747638Ssam #endif
75