xref: /csrg-svn/sys/conf/param.c (revision 26395)
123133Smckusick /*
223133Smckusick  * Copyright (c) 1980 Regents of the University of California.
323133Smckusick  * All rights reserved.  The Berkeley software License Agreement
423133Smckusick  * specifies the terms and conditions for redistribution.
5*26395Skarels  *
6*26395Skarels  *	@(#)param.c	6.13 (Berkeley) 02/23/86
723133Smckusick  */
83124Swnj 
923133Smckusick #ifndef lint
1023133Smckusick char copyright[] =
1123133Smckusick "@(#) Copyright (c) 1980 Regents of the University of California.\n\
1223133Smckusick  All rights reserved.\n";
1323133Smckusick #endif not lint
1423133Smckusick 
153124Swnj #include "../h/param.h"
163124Swnj #include "../h/systm.h"
174668Swnj #include "../h/socket.h"
183124Swnj #include "../h/dir.h"
193124Swnj #include "../h/user.h"
203124Swnj #include "../h/proc.h"
213124Swnj #include "../h/text.h"
223124Swnj #include "../h/inode.h"
233124Swnj #include "../h/file.h"
243124Swnj #include "../h/callout.h"
253124Swnj #include "../h/clist.h"
263124Swnj #include "../h/cmap.h"
274824Swnj #include "../h/mbuf.h"
287638Ssam #include "../h/quota.h"
298229Sroot #include "../h/kernel.h"
303124Swnj /*
313124Swnj  * System parameter formulae.
323124Swnj  *
333124Swnj  * This file is copied into each directory where we compile
343124Swnj  * the kernel; it should be modified there to suit local taste
353124Swnj  * if necessary.
363124Swnj  *
373124Swnj  * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
383124Swnj  */
393124Swnj 
408229Sroot #define	HZ 100
413124Swnj int	hz = HZ;
428229Sroot int	tick = 1000000 / HZ;
4326304Skarels int	tickadj = 240000 / (60 * HZ);		/* can adjust 240ms in 60s */
448229Sroot struct	timezone tz = { TIMEZONE, DST };
453124Swnj #define	NPROC (20 + 8 * MAXUSERS)
463124Swnj int	nproc = NPROC;
4718649Skarels int	ntext = 36 + MAXUSERS;
4816660Smckusick #define NINODE ((NPROC + 16 + MAXUSERS) + 32)
4916660Smckusick int	ninode = NINODE;
5016660Smckusick int	nchsize = NINODE * 11 / 10;
5116575Ssam int	nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
529248Ssam int	ncallout = 16 + NPROC;
5324909Skarels int	nclist = 60 + 12 * MAXUSERS;
545148Swnj int     nmbclusters = NMBCLUSTERS;
559183Ssam #ifdef QUOTA
5617009Smckusick int	nquota = (MAXUSERS * 9) / 7 + 3;
5717009Smckusick int	ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
587638Ssam #endif
593124Swnj 
603124Swnj /*
613124Swnj  * These are initialized at bootstrap time
623124Swnj  * to values dependent on memory size
633124Swnj  */
643124Swnj int	nbuf, nswbuf;
653124Swnj 
663124Swnj /*
673124Swnj  * These have to be allocated somewhere; allocating
6826304Skarels  * them here forces loader errors if this file is omitted
6926304Skarels  * (if they've been externed everywhere else; hah!).
703124Swnj  */
713124Swnj struct	proc *proc, *procNPROC;
723124Swnj struct	text *text, *textNTEXT;
733124Swnj struct	inode *inode, *inodeNINODE;
743124Swnj struct	file *file, *fileNFILE;
753124Swnj struct 	callout *callout;
763124Swnj struct	cblock *cfree;
773124Swnj struct	buf *buf, *swbuf;
783124Swnj char	*buffers;
793124Swnj struct	cmap *cmap, *ecmap;
8026304Skarels struct	namecache *namecache;
819183Ssam #ifdef QUOTA
827638Ssam struct	quota *quota, *quotaNQUOTA;
837638Ssam struct	dquot *dquot, *dquotNDQUOT;
847638Ssam #endif
85