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*37531Smckusick * @(#)param.c 7.4 (Berkeley) 04/25/89 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 15*37531Smckusick #include "../sys/param.h" 16*37531Smckusick #include "../sys/systm.h" 17*37531Smckusick #include "../sys/socket.h" 18*37531Smckusick #include "../ufs/dir.h" 19*37531Smckusick #include "../sys/user.h" 20*37531Smckusick #include "../sys/proc.h" 21*37531Smckusick #include "../sys/text.h" 22*37531Smckusick #include "../ufs/inode.h" 23*37531Smckusick #include "../sys/file.h" 24*37531Smckusick #include "../sys/callout.h" 25*37531Smckusick #include "../sys/clist.h" 26*37531Smckusick #include "../sys/cmap.h" 27*37531Smckusick #include "../sys/mbuf.h" 28*37531Smckusick #include "../ufs/quota.h" 29*37531Smckusick #include "../sys/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 4029929Skarels #ifndef HZ 418229Sroot #define HZ 100 4229929Skarels #endif 433124Swnj int hz = HZ; 448229Sroot int tick = 1000000 / HZ; 4526304Skarels int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ 468229Sroot struct timezone tz = { TIMEZONE, DST }; 473124Swnj #define NPROC (20 + 8 * MAXUSERS) 483124Swnj int nproc = NPROC; 4918649Skarels int ntext = 36 + MAXUSERS; 5016660Smckusick #define NINODE ((NPROC + 16 + MAXUSERS) + 32) 5116660Smckusick int ninode = NINODE; 5216660Smckusick int nchsize = NINODE * 11 / 10; 5316575Ssam int nfile = 16 * (NPROC + 16 + MAXUSERS) / 10 + 32; 549248Ssam int ncallout = 16 + NPROC; 5524909Skarels int nclist = 60 + 12 * MAXUSERS; 565148Swnj int nmbclusters = NMBCLUSTERS; 579183Ssam #ifdef QUOTA 5817009Smckusick int nquota = (MAXUSERS * 9) / 7 + 3; 5917009Smckusick int ndquot = NINODE + (MAXUSERS * NMOUNT) / 4; 607638Ssam #endif 613124Swnj 623124Swnj /* 633124Swnj * These are initialized at bootstrap time 643124Swnj * to values dependent on memory size 653124Swnj */ 663124Swnj int nbuf, nswbuf; 673124Swnj 683124Swnj /* 693124Swnj * These have to be allocated somewhere; allocating 7026304Skarels * them here forces loader errors if this file is omitted 7126304Skarels * (if they've been externed everywhere else; hah!). 723124Swnj */ 733124Swnj struct proc *proc, *procNPROC; 743124Swnj struct text *text, *textNTEXT; 753124Swnj struct inode *inode, *inodeNINODE; 763124Swnj struct file *file, *fileNFILE; 773124Swnj struct callout *callout; 783124Swnj struct cblock *cfree; 793124Swnj struct buf *buf, *swbuf; 803124Swnj char *buffers; 813124Swnj struct cmap *cmap, *ecmap; 8226304Skarels struct namecache *namecache; 839183Ssam #ifdef QUOTA 847638Ssam struct quota *quota, *quotaNQUOTA; 857638Ssam struct dquot *dquot, *dquotNDQUOT; 867638Ssam #endif 87