no more static quota tables
[unix-history] / usr / src / sys / conf / param.c
CommitLineData
b1078c35 1/*
da83315a
KM
2 * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
3 * All rights reserved.
86cbc46c 4 *
da83315a
KM
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 *
b0f6c0d9 17 * @(#)param.c 7.10 (Berkeley) %G%
b1078c35
KM
18 */
19
20#ifndef lint
21char copyright[] =
da83315a 22"@(#) Copyright (c) 1980, 1986, 1989 Regents of the University of California.\n\
b1078c35
KM
23 All rights reserved.\n";
24#endif not lint
ec6f91b0 25
2f44f7b7
KM
26#include "../sys/param.h"
27#include "../sys/systm.h"
28#include "../sys/socket.h"
2f44f7b7
KM
29#include "../sys/user.h"
30#include "../sys/proc.h"
31#include "../sys/text.h"
da83315a 32#include "../sys/vnode.h"
2f44f7b7
KM
33#include "../sys/file.h"
34#include "../sys/callout.h"
35#include "../sys/clist.h"
36#include "../sys/cmap.h"
37#include "../sys/mbuf.h"
38#include "../ufs/quota.h"
39#include "../sys/kernel.h"
ec6f91b0
BJ
40/*
41 * System parameter formulae.
42 *
43 * This file is copied into each directory where we compile
44 * the kernel; it should be modified there to suit local taste
45 * if necessary.
46 *
47 * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
48 */
49
46a9a1d7 50#ifndef HZ
bf75e5ce 51#define HZ 100
46a9a1d7 52#endif
ec6f91b0 53int hz = HZ;
bf75e5ce 54int tick = 1000000 / HZ;
6f33ca1e 55int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */
bf75e5ce 56struct timezone tz = { TIMEZONE, DST };
ec6f91b0
BJ
57#define NPROC (20 + 8 * MAXUSERS)
58int nproc = NPROC;
e0be43f9 59int ntext = 36 + MAXUSERS;
380cb638 60#define NVNODE ((NPROC + 16 + MAXUSERS) + 32)
1eb91f17 61int desiredvnodes = NVNODE;
b025a45a 62int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
2067e85f 63int ncallout = 16 + NPROC;
e31e5017 64int nclist = 60 + 12 * MAXUSERS;
5b3fa994 65int nmbclusters = NMBCLUSTERS;
80b6b780 66int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */
ec6f91b0
BJ
67
68/*
69 * These are initialized at bootstrap time
70 * to values dependent on memory size
71 */
72int nbuf, nswbuf;
73
74/*
75 * These have to be allocated somewhere; allocating
6f33ca1e
MK
76 * them here forces loader errors if this file is omitted
77 * (if they've been externed everywhere else; hah!).
ec6f91b0
BJ
78 */
79struct proc *proc, *procNPROC;
80struct text *text, *textNTEXT;
ec6f91b0
BJ
81struct file *file, *fileNFILE;
82struct callout *callout;
83struct cblock *cfree;
ec6f91b0 84struct buf *buf, *swbuf;
ec6f91b0
BJ
85char *buffers;
86struct cmap *cmap, *ecmap;