1 /* 2 * Copyright (c) 1980, 1986, 1989 Regents of the University of California. 3 * All rights reserved. 4 * 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 * 17 * @(#)param.c 7.8 (Berkeley) 10/24/89 18 */ 19 20 #ifndef lint 21 char copyright[] = 22 "@(#) Copyright (c) 1980, 1986, 1989 Regents of the University of California.\n\ 23 All rights reserved.\n"; 24 #endif not lint 25 26 #include "../sys/param.h" 27 #include "../sys/systm.h" 28 #include "../sys/socket.h" 29 #include "../sys/user.h" 30 #include "../sys/proc.h" 31 #include "../sys/text.h" 32 #include "../sys/vnode.h" 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" 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 50 #ifndef HZ 51 #define HZ 100 52 #endif 53 int hz = HZ; 54 int tick = 1000000 / HZ; 55 int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ 56 struct timezone tz = { TIMEZONE, DST }; 57 #define NPROC (20 + 8 * MAXUSERS) 58 int nproc = NPROC; 59 int ntext = 36 + MAXUSERS; 60 #define NVNODE ((NPROC + 16 + MAXUSERS) + 32) 61 int nvnode = NVNODE; 62 int nchsize = NVNODE * 11 / 10; 63 int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32; 64 int ncallout = 16 + NPROC; 65 int nclist = 60 + 12 * MAXUSERS; 66 int nmbclusters = NMBCLUSTERS; 67 #ifdef QUOTA 68 int nquota = (MAXUSERS * 9) / 7 + 3; 69 int ndquot = NVNODE + (MAXUSERS * NMOUNT) / 4; 70 #endif 71 int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */ 72 73 /* 74 * These are initialized at bootstrap time 75 * to values dependent on memory size 76 */ 77 int nbuf, nswbuf; 78 79 /* 80 * These have to be allocated somewhere; allocating 81 * them here forces loader errors if this file is omitted 82 * (if they've been externed everywhere else; hah!). 83 */ 84 struct proc *proc, *procNPROC; 85 struct text *text, *textNTEXT; 86 struct vnode *vnode, *vnodeNVNODE; 87 struct file *file, *fileNFILE; 88 struct callout *callout; 89 struct cblock *cfree; 90 struct buf *buf, *swbuf; 91 char *buffers; 92 struct cmap *cmap, *ecmap; 93 struct namecache *namecache; 94 #ifdef QUOTA 95 struct quota *quota, *quotaNQUOTA; 96 struct dquot *dquot, *dquotNDQUOT; 97 #endif 98