link together all buffers associated with a particular vnode
[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 *
a3ab1175 17 * @(#)param.c 7.7 (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 "../ufs/inode.h"
34#include "../sys/file.h"
35#include "../sys/callout.h"
36#include "../sys/clist.h"
37#include "../sys/cmap.h"
38#include "../sys/mbuf.h"
39#include "../ufs/quota.h"
40#include "../sys/kernel.h"
ec6f91b0
BJ
41/*
42 * System parameter formulae.
43 *
44 * This file is copied into each directory where we compile
45 * the kernel; it should be modified there to suit local taste
46 * if necessary.
47 *
48 * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
49 */
50
46a9a1d7 51#ifndef HZ
bf75e5ce 52#define HZ 100
46a9a1d7 53#endif
ec6f91b0 54int hz = HZ;
bf75e5ce 55int tick = 1000000 / HZ;
6f33ca1e 56int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */
bf75e5ce 57struct timezone tz = { TIMEZONE, DST };
ec6f91b0
BJ
58#define NPROC (20 + 8 * MAXUSERS)
59int nproc = NPROC;
e0be43f9 60int ntext = 36 + MAXUSERS;
6835b970
KM
61#define NINODE ((NPROC + 16 + MAXUSERS) + 32)
62int ninode = NINODE;
a3ab1175 63#ifndef NFS
6835b970 64int nchsize = NINODE * 11 / 10;
a3ab1175
KM
65#else
66int nnfsnode = NINODE;
67int nchsize = (2 * NINODE) * 11 / 10;
68#endif /* NFS */
b025a45a 69int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32;
2067e85f 70int ncallout = 16 + NPROC;
e31e5017 71int nclist = 60 + 12 * MAXUSERS;
5b3fa994 72int nmbclusters = NMBCLUSTERS;
af0b24db 73#ifdef QUOTA
72d2d310
KM
74int nquota = (MAXUSERS * 9) / 7 + 3;
75int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4;
ab12a1f4 76#endif
80b6b780 77int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */
ec6f91b0
BJ
78
79/*
80 * These are initialized at bootstrap time
81 * to values dependent on memory size
82 */
83int nbuf, nswbuf;
84
85/*
86 * These have to be allocated somewhere; allocating
6f33ca1e
MK
87 * them here forces loader errors if this file is omitted
88 * (if they've been externed everywhere else; hah!).
ec6f91b0
BJ
89 */
90struct proc *proc, *procNPROC;
91struct text *text, *textNTEXT;
92struct inode *inode, *inodeNINODE;
93struct file *file, *fileNFILE;
94struct callout *callout;
95struct cblock *cfree;
ec6f91b0 96struct buf *buf, *swbuf;
ec6f91b0
BJ
97char *buffers;
98struct cmap *cmap, *ecmap;
6f33ca1e 99struct namecache *namecache;
af0b24db 100#ifdef QUOTA
ab12a1f4
SL
101struct quota *quota, *quotaNQUOTA;
102struct dquot *dquot, *dquotNDQUOT;
103#endif