123133Smckusick /* 229316Smckusick * Copyright (c) 1980, 1986 Regents of the University of California. 323133Smckusick * All rights reserved. The Berkeley software License Agreement 423133Smckusick * specifies the terms and conditions for redistribution. 526395Skarels * 6*29929Skarels * @(#)param.c 7.2 (Berkeley) 10/29/86 723133Smckusick */ 83124Swnj 923133Smckusick #ifndef lint 1023133Smckusick char copyright[] = 1129316Smckusick "@(#) Copyright (c) 1980, 1986 Regents of the University of California.\n\ 1223133Smckusick All rights reserved.\n"; 1323133Smckusick #endif not lint 1423133Smckusick 153124Swnj #include "../h/param.h" 163124Swnj #include "../h/systm.h" 174668Swnj #include "../h/socket.h" 183124Swnj #include "../h/dir.h" 193124Swnj #include "../h/user.h" 203124Swnj #include "../h/proc.h" 213124Swnj #include "../h/text.h" 223124Swnj #include "../h/inode.h" 233124Swnj #include "../h/file.h" 243124Swnj #include "../h/callout.h" 253124Swnj #include "../h/clist.h" 263124Swnj #include "../h/cmap.h" 274824Swnj #include "../h/mbuf.h" 287638Ssam #include "../h/quota.h" 298229Sroot #include "../h/kernel.h" 303124Swnj /* 313124Swnj * System parameter formulae. 323124Swnj * 333124Swnj * This file is copied into each directory where we compile 343124Swnj * the kernel; it should be modified there to suit local taste 353124Swnj * if necessary. 363124Swnj * 373124Swnj * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx 383124Swnj */ 393124Swnj 40*29929Skarels #ifndef HZ 41*29929Skarels #ifdef VAX 428229Sroot #define HZ 100 43*29929Skarels #endif 44*29929Skarels #ifdef TAHOE 45*29929Skarels #define HZ 60 46*29929Skarels #endif 47*29929Skarels #endif 483124Swnj int hz = HZ; 498229Sroot int tick = 1000000 / HZ; 5026304Skarels int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ 518229Sroot struct timezone tz = { TIMEZONE, DST }; 523124Swnj #define NPROC (20 + 8 * MAXUSERS) 533124Swnj int nproc = NPROC; 5418649Skarels int ntext = 36 + MAXUSERS; 5516660Smckusick #define NINODE ((NPROC + 16 + MAXUSERS) + 32) 5616660Smckusick int ninode = NINODE; 5716660Smckusick int nchsize = NINODE * 11 / 10; 5816575Ssam int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32; 599248Ssam int ncallout = 16 + NPROC; 6024909Skarels int nclist = 60 + 12 * MAXUSERS; 615148Swnj int nmbclusters = NMBCLUSTERS; 629183Ssam #ifdef QUOTA 6317009Smckusick int nquota = (MAXUSERS * 9) / 7 + 3; 6417009Smckusick int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4; 657638Ssam #endif 663124Swnj 673124Swnj /* 683124Swnj * These are initialized at bootstrap time 693124Swnj * to values dependent on memory size 703124Swnj */ 713124Swnj int nbuf, nswbuf; 723124Swnj 733124Swnj /* 743124Swnj * These have to be allocated somewhere; allocating 7526304Skarels * them here forces loader errors if this file is omitted 7626304Skarels * (if they've been externed everywhere else; hah!). 773124Swnj */ 783124Swnj struct proc *proc, *procNPROC; 793124Swnj struct text *text, *textNTEXT; 803124Swnj struct inode *inode, *inodeNINODE; 813124Swnj struct file *file, *fileNFILE; 823124Swnj struct callout *callout; 833124Swnj struct cblock *cfree; 843124Swnj struct buf *buf, *swbuf; 853124Swnj char *buffers; 863124Swnj struct cmap *cmap, *ecmap; 8726304Skarels struct namecache *namecache; 889183Ssam #ifdef QUOTA 897638Ssam struct quota *quota, *quotaNQUOTA; 907638Ssam struct dquot *dquot, *dquotNDQUOT; 917638Ssam #endif 92