1*17009Smckusick /* param.c 6.7 84/08/23 */ 23124Swnj 33124Swnj #include "../h/param.h" 43124Swnj #include "../h/systm.h" 54668Swnj #include "../h/socket.h" 63124Swnj #include "../h/dir.h" 73124Swnj #include "../h/user.h" 83124Swnj #include "../h/proc.h" 93124Swnj #include "../h/text.h" 103124Swnj #include "../h/inode.h" 113124Swnj #include "../h/file.h" 123124Swnj #include "../h/callout.h" 133124Swnj #include "../h/clist.h" 143124Swnj #include "../h/cmap.h" 154824Swnj #include "../h/mbuf.h" 167638Ssam #include "../h/quota.h" 178229Sroot #include "../h/kernel.h" 183124Swnj /* 193124Swnj * System parameter formulae. 203124Swnj * 213124Swnj * This file is copied into each directory where we compile 223124Swnj * the kernel; it should be modified there to suit local taste 233124Swnj * if necessary. 243124Swnj * 253124Swnj * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx 263124Swnj */ 273124Swnj 288229Sroot #define HZ 100 293124Swnj int hz = HZ; 308229Sroot int tick = 1000000 / HZ; 318229Sroot struct timezone tz = { TIMEZONE, DST }; 323124Swnj #define NPROC (20 + 8 * MAXUSERS) 333124Swnj int nproc = NPROC; 3416575Ssam int ntext = 24 + MAXUSERS; 3516660Smckusick #define NINODE ((NPROC + 16 + MAXUSERS) + 32) 3616660Smckusick int ninode = NINODE; 3716660Smckusick int nchsize = NINODE * 11 / 10; 3816575Ssam int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32; 399248Ssam int ncallout = 16 + NPROC; 403124Swnj int nclist = 100 + 16 * MAXUSERS; 413620Sroot int nport = NPROC / 2; 425148Swnj int nmbclusters = NMBCLUSTERS; 439183Ssam #ifdef QUOTA 44*17009Smckusick int nquota = (MAXUSERS * 9) / 7 + 3; 45*17009Smckusick int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4; 467638Ssam #endif 473124Swnj 483124Swnj /* 493124Swnj * These are initialized at bootstrap time 503124Swnj * to values dependent on memory size 513124Swnj */ 523124Swnj int nbuf, nswbuf; 533124Swnj 543124Swnj /* 553124Swnj * These have to be allocated somewhere; allocating 563124Swnj * them here forces loader errors if this file is omitted. 573124Swnj */ 583124Swnj struct proc *proc, *procNPROC; 593124Swnj struct text *text, *textNTEXT; 603124Swnj struct inode *inode, *inodeNINODE; 613124Swnj struct file *file, *fileNFILE; 623124Swnj struct callout *callout; 633124Swnj struct cblock *cfree; 643124Swnj struct buf *buf, *swbuf; 653124Swnj short *swsize; 663124Swnj int *swpf; 673124Swnj char *buffers; 683124Swnj struct cmap *cmap, *ecmap; 6915802Smckusick struct nch *nch; 709183Ssam #ifdef QUOTA 717638Ssam struct quota *quota, *quotaNQUOTA; 727638Ssam struct dquot *dquot, *dquotNDQUOT; 737638Ssam #endif 74