Commit | Line | Data |
---|---|---|
b1078c35 | 1 | /* |
08d9a162 KB |
2 | * Copyright (c) 1980, 1986, 1989, 1993 |
3 | * The Regents of the University of California. All rights reserved. | |
adb35f79 KB |
4 | * (c) UNIX System Laboratories, Inc. |
5 | * All or some portions of this file are derived from material licensed | |
6 | * to the University of California by American Telephone and Telegraph | |
7 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | |
8 | * the permission of UNIX System Laboratories, Inc. | |
86cbc46c | 9 | * |
dbf0c423 | 10 | * %sccs.include.redist.c% |
da83315a | 11 | * |
761b86bd | 12 | * @(#)param.c 8.3 (Berkeley) %G% |
b1078c35 KM |
13 | */ |
14 | ||
38a01dbe KB |
15 | #include <sys/param.h> |
16 | #include <sys/systm.h> | |
17 | #include <sys/socket.h> | |
18 | #include <sys/proc.h> | |
19 | #include <sys/vnode.h> | |
20 | #include <sys/file.h> | |
21 | #include <sys/callout.h> | |
22 | #include <sys/clist.h> | |
23 | #include <sys/mbuf.h> | |
24 | #include <sys/kernel.h> | |
25 | ||
26 | #include <ufs/ufs/quota.h> | |
27 | ||
7d08bbf1 | 28 | #ifdef SYSVSHM |
38a01dbe KB |
29 | #include <machine/vmparam.h> |
30 | #include <sys/shm.h> | |
7d08bbf1 KM |
31 | #endif |
32 | ||
ec6f91b0 BJ |
33 | /* |
34 | * System parameter formulae. | |
35 | * | |
36 | * This file is copied into each directory where we compile | |
37 | * the kernel; it should be modified there to suit local taste | |
38 | * if necessary. | |
39 | * | |
40 | * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx | |
41 | */ | |
42 | ||
46a9a1d7 | 43 | #ifndef HZ |
bf75e5ce | 44 | #define HZ 100 |
46a9a1d7 | 45 | #endif |
ec6f91b0 | 46 | int hz = HZ; |
bf75e5ce | 47 | int tick = 1000000 / HZ; |
b03a0fb1 | 48 | int tickadj = 30000 / (60 * HZ); /* can adjust 30ms in 60s */ |
bf75e5ce | 49 | struct timezone tz = { TIMEZONE, DST }; |
582864af | 50 | #define NPROC (20 + 16 * MAXUSERS) |
64504438 | 51 | int maxproc = NPROC; |
582864af MK |
52 | #define NTEXT (80 + NPROC / 8) /* actually the object cache */ |
53 | #define NVNODE (NPROC + NTEXT + 100) | |
98ce25a8 | 54 | int desiredvnodes = NVNODE; |
582864af | 55 | int maxfiles = 3 * (NPROC + MAXUSERS) + 80; |
2067e85f | 56 | int ncallout = 16 + NPROC; |
e31e5017 | 57 | int nclist = 60 + 12 * MAXUSERS; |
582864af | 58 | int nmbclusters = NMBCLUSTERS; |
80b6b780 | 59 | int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */ |
ec6f91b0 | 60 | |
7d08bbf1 | 61 | /* |
582864af | 62 | * Values in support of System V compatible shared memory. XXX |
7d08bbf1 KM |
63 | */ |
64 | #ifdef SYSVSHM | |
65 | #define SHMMAX (SHMMAXPGS*NBPG) | |
582864af MK |
66 | #define SHMMIN 1 |
67 | #define SHMMNI 32 /* <= SHMMMNI in shm.h */ | |
7d08bbf1 | 68 | #define SHMSEG 8 |
582864af | 69 | #define SHMALL (SHMMAXPGS/CLSIZE) |
7d08bbf1 KM |
70 | |
71 | struct shminfo shminfo = { | |
72 | SHMMAX, | |
73 | SHMMIN, | |
74 | SHMMNI, | |
75 | SHMSEG, | |
76 | SHMALL | |
77 | }; | |
78 | #endif | |
79 | ||
ec6f91b0 BJ |
80 | /* |
81 | * These are initialized at bootstrap time | |
82 | * to values dependent on memory size | |
83 | */ | |
84 | int nbuf, nswbuf; | |
85 | ||
86 | /* | |
87 | * These have to be allocated somewhere; allocating | |
6f33ca1e MK |
88 | * them here forces loader errors if this file is omitted |
89 | * (if they've been externed everywhere else; hah!). | |
ec6f91b0 | 90 | */ |
ec6f91b0 BJ |
91 | struct callout *callout; |
92 | struct cblock *cfree; | |
ec6f91b0 | 93 | struct buf *buf, *swbuf; |
ec6f91b0 | 94 | char *buffers; |