xref: /csrg-svn/sys/conf/param.c (revision 38159)
123133Smckusick /*
237766Smckusick  * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
337766Smckusick  * All rights reserved.
426395Skarels  *
537766Smckusick  * Redistribution and use in source and binary forms are permitted
637766Smckusick  * provided that the above copyright notice and this paragraph are
737766Smckusick  * duplicated in all such forms and that any documentation,
837766Smckusick  * advertising materials, and other materials related to such
937766Smckusick  * distribution and use acknowledge that the software was developed
1037766Smckusick  * by the University of California, Berkeley.  The name of the
1137766Smckusick  * University may not be used to endorse or promote products derived
1237766Smckusick  * from this software without specific prior written permission.
1337766Smckusick  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1437766Smckusick  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1537766Smckusick  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1637766Smckusick  *
17*38159Smckusick  *	@(#)param.c	7.6 (Berkeley) 05/29/89
1823133Smckusick  */
193124Swnj 
2023133Smckusick #ifndef lint
2123133Smckusick char copyright[] =
2237766Smckusick "@(#) Copyright (c) 1980, 1986, 1989 Regents of the University of California.\n\
2323133Smckusick  All rights reserved.\n";
2423133Smckusick #endif not lint
2523133Smckusick 
2637531Smckusick #include "../sys/param.h"
2737531Smckusick #include "../sys/systm.h"
2837531Smckusick #include "../sys/socket.h"
2937531Smckusick #include "../sys/user.h"
3037531Smckusick #include "../sys/proc.h"
3137531Smckusick #include "../sys/text.h"
3237766Smckusick #include "../sys/vnode.h"
3337531Smckusick #include "../ufs/inode.h"
3437531Smckusick #include "../sys/file.h"
3537531Smckusick #include "../sys/callout.h"
3637531Smckusick #include "../sys/clist.h"
3737531Smckusick #include "../sys/cmap.h"
3837531Smckusick #include "../sys/mbuf.h"
3937531Smckusick #include "../ufs/quota.h"
4037531Smckusick #include "../sys/kernel.h"
413124Swnj /*
423124Swnj  * System parameter formulae.
433124Swnj  *
443124Swnj  * This file is copied into each directory where we compile
453124Swnj  * the kernel; it should be modified there to suit local taste
463124Swnj  * if necessary.
473124Swnj  *
483124Swnj  * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
493124Swnj  */
503124Swnj 
5129929Skarels #ifndef HZ
528229Sroot #define	HZ 100
5329929Skarels #endif
543124Swnj int	hz = HZ;
558229Sroot int	tick = 1000000 / HZ;
5626304Skarels int	tickadj = 240000 / (60 * HZ);		/* can adjust 240ms in 60s */
578229Sroot struct	timezone tz = { TIMEZONE, DST };
583124Swnj #define	NPROC (20 + 8 * MAXUSERS)
593124Swnj int	nproc = NPROC;
6018649Skarels int	ntext = 36 + MAXUSERS;
6116660Smckusick #define NINODE ((NPROC + 16 + MAXUSERS) + 32)
6216660Smckusick int	ninode = NINODE;
6316660Smckusick int	nchsize = NINODE * 11 / 10;
6416575Ssam int	nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
659248Ssam int	ncallout = 16 + NPROC;
6624909Skarels int	nclist = 60 + 12 * MAXUSERS;
675148Swnj int     nmbclusters = NMBCLUSTERS;
689183Ssam #ifdef QUOTA
6917009Smckusick int	nquota = (MAXUSERS * 9) / 7 + 3;
7017009Smckusick int	ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
717638Ssam #endif
72*38159Smckusick int	fscale = FSCALE;	/* kernel uses `FSCALE', user uses `fscale' */
733124Swnj 
743124Swnj /*
753124Swnj  * These are initialized at bootstrap time
763124Swnj  * to values dependent on memory size
773124Swnj  */
783124Swnj int	nbuf, nswbuf;
793124Swnj 
803124Swnj /*
813124Swnj  * These have to be allocated somewhere; allocating
8226304Skarels  * them here forces loader errors if this file is omitted
8326304Skarels  * (if they've been externed everywhere else; hah!).
843124Swnj  */
853124Swnj struct	proc *proc, *procNPROC;
863124Swnj struct	text *text, *textNTEXT;
873124Swnj struct	inode *inode, *inodeNINODE;
883124Swnj struct	file *file, *fileNFILE;
893124Swnj struct 	callout *callout;
903124Swnj struct	cblock *cfree;
913124Swnj struct	buf *buf, *swbuf;
923124Swnj char	*buffers;
933124Swnj struct	cmap *cmap, *ecmap;
9426304Skarels struct	namecache *namecache;
959183Ssam #ifdef QUOTA
967638Ssam struct	quota *quota, *quotaNQUOTA;
977638Ssam struct	dquot *dquot, *dquotNDQUOT;
987638Ssam #endif
99