xref: /csrg-svn/sys/conf/param.c (revision 37766)
123133Smckusick /*
2*37766Smckusick  * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
3*37766Smckusick  * All rights reserved.
426395Skarels  *
5*37766Smckusick  * Redistribution and use in source and binary forms are permitted
6*37766Smckusick  * provided that the above copyright notice and this paragraph are
7*37766Smckusick  * duplicated in all such forms and that any documentation,
8*37766Smckusick  * advertising materials, and other materials related to such
9*37766Smckusick  * distribution and use acknowledge that the software was developed
10*37766Smckusick  * by the University of California, Berkeley.  The name of the
11*37766Smckusick  * University may not be used to endorse or promote products derived
12*37766Smckusick  * from this software without specific prior written permission.
13*37766Smckusick  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*37766Smckusick  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*37766Smckusick  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16*37766Smckusick  *
17*37766Smckusick  *	@(#)param.c	7.5 (Berkeley) 05/09/89
1823133Smckusick  */
193124Swnj 
2023133Smckusick #ifndef lint
2123133Smckusick char copyright[] =
22*37766Smckusick "@(#) 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"
32*37766Smckusick #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
723124Swnj 
733124Swnj /*
743124Swnj  * These are initialized at bootstrap time
753124Swnj  * to values dependent on memory size
763124Swnj  */
773124Swnj int	nbuf, nswbuf;
783124Swnj 
793124Swnj /*
803124Swnj  * These have to be allocated somewhere; allocating
8126304Skarels  * them here forces loader errors if this file is omitted
8226304Skarels  * (if they've been externed everywhere else; hah!).
833124Swnj  */
843124Swnj struct	proc *proc, *procNPROC;
853124Swnj struct	text *text, *textNTEXT;
863124Swnj struct	inode *inode, *inodeNINODE;
873124Swnj struct	file *file, *fileNFILE;
883124Swnj struct 	callout *callout;
893124Swnj struct	cblock *cfree;
903124Swnj struct	buf *buf, *swbuf;
913124Swnj char	*buffers;
923124Swnj struct	cmap *cmap, *ecmap;
9326304Skarels struct	namecache *namecache;
949183Ssam #ifdef QUOTA
957638Ssam struct	quota *quota, *quotaNQUOTA;
967638Ssam struct	dquot *dquot, *dquotNDQUOT;
977638Ssam #endif
98