Commit | Line | Data |
---|---|---|
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 | |
21 | char 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 | 54 | int hz = HZ; |
bf75e5ce | 55 | int tick = 1000000 / HZ; |
6f33ca1e | 56 | int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ |
bf75e5ce | 57 | struct timezone tz = { TIMEZONE, DST }; |
ec6f91b0 BJ |
58 | #define NPROC (20 + 8 * MAXUSERS) |
59 | int nproc = NPROC; | |
e0be43f9 | 60 | int ntext = 36 + MAXUSERS; |
6835b970 KM |
61 | #define NINODE ((NPROC + 16 + MAXUSERS) + 32) |
62 | int ninode = NINODE; | |
a3ab1175 | 63 | #ifndef NFS |
6835b970 | 64 | int nchsize = NINODE * 11 / 10; |
a3ab1175 KM |
65 | #else |
66 | int nnfsnode = NINODE; | |
67 | int nchsize = (2 * NINODE) * 11 / 10; | |
68 | #endif /* NFS */ | |
b025a45a | 69 | int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32; |
2067e85f | 70 | int ncallout = 16 + NPROC; |
e31e5017 | 71 | int nclist = 60 + 12 * MAXUSERS; |
5b3fa994 | 72 | int nmbclusters = NMBCLUSTERS; |
af0b24db | 73 | #ifdef QUOTA |
72d2d310 KM |
74 | int nquota = (MAXUSERS * 9) / 7 + 3; |
75 | int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4; | |
ab12a1f4 | 76 | #endif |
80b6b780 | 77 | int 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 | */ | |
83 | int 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 | */ |
90 | struct proc *proc, *procNPROC; | |
91 | struct text *text, *textNTEXT; | |
92 | struct inode *inode, *inodeNINODE; | |
93 | struct file *file, *fileNFILE; | |
94 | struct callout *callout; | |
95 | struct cblock *cfree; | |
ec6f91b0 | 96 | struct buf *buf, *swbuf; |
ec6f91b0 BJ |
97 | char *buffers; |
98 | struct cmap *cmap, *ecmap; | |
6f33ca1e | 99 | struct namecache *namecache; |
af0b24db | 100 | #ifdef QUOTA |
ab12a1f4 SL |
101 | struct quota *quota, *quotaNQUOTA; |
102 | struct dquot *dquot, *dquotNDQUOT; | |
103 | #endif |