vmparam.h revision 1.2
11.54Sthorpej/* 21.1Ssimonb * Copyright (c) 1992, 1993 31.1Ssimonb * The Regents of the University of California. All rights reserved. 41.1Ssimonb * 51.1Ssimonb * This software was developed by the Computer Systems Engineering group 61.1Ssimonb * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 71.1Ssimonb * contributed to Berkeley. 81.1Ssimonb * 91.1Ssimonb * All advertising materials mentioning features or use of this software 101.1Ssimonb * must display the following acknowledgement: 111.1Ssimonb * This product includes software developed by the University of 121.1Ssimonb * California, Lawrence Berkeley Laboratory. 131.1Ssimonb * 141.1Ssimonb * Redistribution and use in source and binary forms, with or without 151.1Ssimonb * modification, are permitted provided that the following conditions 161.1Ssimonb * are met: 171.1Ssimonb * 1. Redistributions of source code must retain the above copyright 181.1Ssimonb * notice, this list of conditions and the following disclaimer. 191.1Ssimonb * 2. Redistributions in binary form must reproduce the above copyright 201.1Ssimonb * notice, this list of conditions and the following disclaimer in the 211.1Ssimonb * documentation and/or other materials provided with the distribution. 221.1Ssimonb * 3. All advertising materials mentioning features or use of this software 231.1Ssimonb * must display the following acknowledgement: 241.1Ssimonb * This product includes software developed by the University of 251.1Ssimonb * California, Berkeley and its contributors. 261.1Ssimonb * 4. Neither the name of the University nor the names of its contributors 271.1Ssimonb * may be used to endorse or promote products derived from this software 281.1Ssimonb * without specific prior written permission. 291.1Ssimonb * 301.1Ssimonb * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 311.1Ssimonb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 321.1Ssimonb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 331.1Ssimonb * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 341.1Ssimonb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 351.1Ssimonb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 361.1Ssimonb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 371.1Ssimonb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 381.1Ssimonb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 391.1Ssimonb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 401.1Ssimonb * SUCH DAMAGE. 411.1Ssimonb * 421.1Ssimonb * @(#)vmparam.h 8.1 (Berkeley) 6/11/93 431.1Ssimonb * 441.1Ssimonb * from: Header: vmparam.h,v 1.8 93/05/25 09:52:16 torek Exp 451.1Ssimonb * $Id: vmparam.h,v 1.2 1993/10/11 02:28:31 deraadt Exp $ 461.1Ssimonb */ 471.1Ssimonb 481.1Ssimonb/* 491.54Sthorpej * Machine dependent constants for Sun-4c SPARC 501.34Stls */ 511.1Ssimonb 521.1Ssimonb/* 531.1Ssimonb * USRTEXT is the start of the user text/data space, while USRSTACK 541.31Smatt * is the top (end) of the user stack. 551.1Ssimonb */ 561.31Smatt#define USRTEXT 0x2000 /* Start of user text */ 571.31Smatt#define USRSTACK KERNBASE /* Start of user stack */ 581.46Smsaitoh 591.31Smatt/* 601.31Smatt * Virtual memory related constants, all in bytes 611.31Smatt */ 621.1Ssimonb#ifndef MAXTSIZ 631.1Ssimonb#define MAXTSIZ (8*1024*1024) /* max text size */ 641.1Ssimonb#endif 651.29Suebayasi#ifndef DFLDSIZ 661.1Ssimonb#define DFLDSIZ (16*1024*1024) /* initial data size limit */ 671.1Ssimonb#endif 681.1Ssimonb#ifndef MAXDSIZ 691.1Ssimonb#define MAXDSIZ (64*1024*1024) /* max data size */ 701.1Ssimonb#endif 711.1Ssimonb#ifndef DFLSSIZ 721.1Ssimonb#define DFLSSIZ (512*1024) /* initial stack size limit */ 731.39Sriastrad#endif 741.1Ssimonb#ifndef MAXSSIZ 751.1Ssimonb#define MAXSSIZ MAXDSIZ /* max stack size */ 761.1Ssimonb#endif 771.1Ssimonb 781.1Ssimonb/* 791.1Ssimonb * Default sizes of swap allocation chunks (see dmap.h). 801.1Ssimonb * The actual values may be changed in vminit() based on MAXDSIZ. 811.1Ssimonb * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024. 821.1Ssimonb * DMMIN should be at least ctod(1) so that vtod() works. 831.1Ssimonb * vminit() insures this. 841.1Ssimonb */ 851.1Ssimonb#define DMMIN 32 /* smallest swap allocation */ 861.1Ssimonb#define DMMAX 4096 /* largest potential swap allocation */ 871.1Ssimonb#define DMTEXT 1024 /* swap allocation for text */ 881.1Ssimonb 891.1Ssimonb/* 901.1Ssimonb * The time for a process to be blocked before being very swappable. 911.1Ssimonb * This is a number of seconds which the system takes as being a non-trivial 921.1Ssimonb * amount of real time. You probably shouldn't change this; 931.1Ssimonb * it is used in subtle ways (fractions and multiples of it are, that is, like 941.1Ssimonb * half of a ``long time'', almost a long time, etc.) 951.1Ssimonb * It is related to human patience and other factors which don't really 961.1Ssimonb * change over time. 971.1Ssimonb */ 981.1Ssimonb#define MAXSLP 20 991.1Ssimonb 1001.1Ssimonb/* 1011.1Ssimonb * A swapped in process is given a small amount of core without being bothered 1021.1Ssimonb * by the page replacement algorithm. Basically this says that if you are 1031.1Ssimonb * swapped in you deserve some resources. We protect the last SAFERSS 1041.1Ssimonb * pages against paging and will just swap you out rather than paging you. 1051.1Ssimonb * Note that each process has at least UPAGES+CLSIZE pages which are not 1061.1Ssimonb * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this 1071.1Ssimonb * number just means a swapped in process is given around 25k bytes. 1081.1Ssimonb * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81), 1091.20Ssimonb * so we loan each swapped in process memory worth 100$, or just admit 1101.1Ssimonb * that we don't consider it worthwhile and swap it out to disk which costs 1111.1Ssimonb * $30/mb or about $0.75. 1121.1Ssimonb */ 1131.1Ssimonb#define SAFERSS 4 /* nominal ``small'' resident set size 1141.1Ssimonb protected against replacement */ 1151.1Ssimonb 1161.1Ssimonb/* 1171.33Skiyohara * Mach derived constants 1181.1Ssimonb */ 1191.1Ssimonb 1201.1Ssimonb/* 1211.1Ssimonb * User/kernel map constants. Note that sparc/vaddrs.h defines the 1221.1Ssimonb * IO space virtual base, which must be the same as VM_MAX_KERNEL_ADDRESS: 1231.1Ssimonb * tread with care. 1241.1Ssimonb */ 1251.35Skiyohara#define VM_MIN_ADDRESS ((vm_offset_t)0) 1261.1Ssimonb#define VM_MAX_ADDRESS ((vm_offset_t)KERNBASE) 1271.1Ssimonb#define VM_MAXUSER_ADDRESS ((vm_offset_t)KERNBASE) 1281.1Ssimonb#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNBASE) 1291.1Ssimonb#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xfe000000) 1301.1Ssimonb 1311.1Ssimonb/* virtual sizes (bytes) for various kernel submaps */ 1321.1Ssimonb#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) 1331.1Ssimonb#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES) 1341.1Ssimonb