123133Smckusick /* 263471Sbostic * Copyright (c) 1980, 1986, 1989, 1993 363471Sbostic * The Regents of the University of California. All rights reserved. 465768Sbostic * (c) UNIX System Laboratories, Inc. 565768Sbostic * All or some portions of this file are derived from material licensed 665768Sbostic * to the University of California by American Telephone and Telegraph 765768Sbostic * Co. or Unix System Laboratories, Inc. and are reproduced herein with 865768Sbostic * the permission of UNIX System Laboratories, Inc. 926395Skarels * 1044428Sbostic * %sccs.include.redist.c% 1137766Smckusick * 12*67722Smckusick * @(#)param.c 8.3 (Berkeley) 08/20/94 1323133Smckusick */ 143124Swnj 1556502Sbostic #include <sys/param.h> 1656502Sbostic #include <sys/systm.h> 1756502Sbostic #include <sys/socket.h> 1856502Sbostic #include <sys/proc.h> 1956502Sbostic #include <sys/vnode.h> 2056502Sbostic #include <sys/file.h> 2156502Sbostic #include <sys/callout.h> 2256502Sbostic #include <sys/clist.h> 2356502Sbostic #include <sys/mbuf.h> 2456502Sbostic #include <sys/kernel.h> 2556502Sbostic 2656502Sbostic #include <ufs/ufs/quota.h> 2756502Sbostic 2841562Smckusick #ifdef SYSVSHM 2956502Sbostic #include <machine/vmparam.h> 3056502Sbostic #include <sys/shm.h> 3141562Smckusick #endif 3241562Smckusick 333124Swnj /* 343124Swnj * System parameter formulae. 353124Swnj * 363124Swnj * This file is copied into each directory where we compile 373124Swnj * the kernel; it should be modified there to suit local taste 383124Swnj * if necessary. 393124Swnj * 403124Swnj * Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx 413124Swnj */ 423124Swnj 4329929Skarels #ifndef HZ 448229Sroot #define HZ 100 4529929Skarels #endif 463124Swnj int hz = HZ; 478229Sroot int tick = 1000000 / HZ; 4855055Storek int tickadj = 30000 / (60 * HZ); /* can adjust 30ms in 60s */ 498229Sroot struct timezone tz = { TIMEZONE, DST }; 5050221Skarels #define NPROC (20 + 16 * MAXUSERS) 5148451Skarels int maxproc = NPROC; 5250221Skarels #define NTEXT (80 + NPROC / 8) /* actually the object cache */ 5350221Skarels #define NVNODE (NPROC + NTEXT + 100) 5463470Smckusick int desiredvnodes = NVNODE; 5550221Skarels int maxfiles = 3 * (NPROC + MAXUSERS) + 80; 569248Ssam int ncallout = 16 + NPROC; 5724909Skarels int nclist = 60 + 12 * MAXUSERS; 5850221Skarels int nmbclusters = NMBCLUSTERS; 5938159Smckusick int fscale = FSCALE; /* kernel uses `FSCALE', user uses `fscale' */ 603124Swnj 613124Swnj /* 6250221Skarels * Values in support of System V compatible shared memory. XXX 6341562Smckusick */ 6441562Smckusick #ifdef SYSVSHM 6541562Smckusick #define SHMMAX (SHMMAXPGS*NBPG) 6650221Skarels #define SHMMIN 1 6750221Skarels #define SHMMNI 32 /* <= SHMMMNI in shm.h */ 6841562Smckusick #define SHMSEG 8 6950221Skarels #define SHMALL (SHMMAXPGS/CLSIZE) 7041562Smckusick 7141562Smckusick struct shminfo shminfo = { 7241562Smckusick SHMMAX, 7341562Smckusick SHMMIN, 7441562Smckusick SHMMNI, 7541562Smckusick SHMSEG, 7641562Smckusick SHMALL 7741562Smckusick }; 7841562Smckusick #endif 7941562Smckusick 8041562Smckusick /* 813124Swnj * These are initialized at bootstrap time 823124Swnj * to values dependent on memory size 833124Swnj */ 843124Swnj int nbuf, nswbuf; 853124Swnj 863124Swnj /* 873124Swnj * These have to be allocated somewhere; allocating 8826304Skarels * them here forces loader errors if this file is omitted 8926304Skarels * (if they've been externed everywhere else; hah!). 903124Swnj */ 913124Swnj struct callout *callout; 923124Swnj struct cblock *cfree; 933124Swnj struct buf *buf, *swbuf; 943124Swnj char *buffers; 95