vmparam3.h revision 1.9
11.9Scgd/* $NetBSD: vmparam3.h,v 1.9 1994/10/26 09:11:29 cgd Exp $ */ 21.9Scgd 31.7Sglass/* 41.7Sglass * Copyright (c) 1993 Adam Glass 51.7Sglass * Copyright (c) 1988 University of Utah. 61.7Sglass * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 71.7Sglass * All rights reserved. 81.7Sglass * 91.7Sglass * This code is derived from software contributed to Berkeley by 101.7Sglass * the Systems Programming Group of the University of Utah Computer 111.7Sglass * Science Department. 121.7Sglass * 131.7Sglass * Redistribution and use in source and binary forms, with or without 141.7Sglass * modification, are permitted provided that the following conditions 151.7Sglass * are met: 161.7Sglass * 1. Redistributions of source code must retain the above copyright 171.7Sglass * notice, this list of conditions and the following disclaimer. 181.7Sglass * 2. Redistributions in binary form must reproduce the above copyright 191.7Sglass * notice, this list of conditions and the following disclaimer in the 201.7Sglass * documentation and/or other materials provided with the distribution. 211.7Sglass * 3. All advertising materials mentioning features or use of this software 221.7Sglass * must display the following acknowledgement: 231.7Sglass * This product includes software developed by the University of 241.7Sglass * California, Berkeley and its contributors. 251.7Sglass * 4. Neither the name of the University nor the names of its contributors 261.7Sglass * may be used to endorse or promote products derived from this software 271.7Sglass * without specific prior written permission. 281.7Sglass * 291.7Sglass * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 301.7Sglass * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 311.7Sglass * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 321.7Sglass * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 331.7Sglass * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 341.7Sglass * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 351.7Sglass * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 361.7Sglass * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 371.7Sglass * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 381.7Sglass * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 391.7Sglass * SUCH DAMAGE. 401.7Sglass * 411.7Sglass * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ 421.7Sglass * 431.9Scgd * @(#)vmparam.h 7.3 (Berkeley) 5/7/91 441.7Sglass */ 451.1Sglass 461.1Sglass#define USRTEXT NBPG 471.6Sglass#define USRSTACK 0x0E000000 481.1Sglass 491.1Sglass/* 501.1Sglass * Virtual memory related constants, all in bytes 511.1Sglass */ 521.1Sglass#ifndef MAXTSIZ 531.6Sglass#define MAXTSIZ (8*1024*1024) /* max text size */ 541.1Sglass#endif 551.1Sglass#ifndef DFLDSIZ 561.1Sglass#define DFLDSIZ (8*1024*1024) /* initial data size limit */ 571.1Sglass#endif 581.1Sglass#ifndef MAXDSIZ 591.6Sglass#define MAXDSIZ (32*1024*1024) /* max data size */ 601.1Sglass#endif 611.1Sglass#ifndef DFLSSIZ 621.1Sglass#define DFLSSIZ (512*1024) /* initial stack size limit */ 631.1Sglass#endif 641.1Sglass#ifndef MAXSSIZ 651.6Sglass#define MAXSSIZ (MAXDSIZ) /* max stack size */ 661.1Sglass#endif 671.1Sglass 681.1Sglass/* 691.1Sglass * Default sizes of swap allocation chunks (see dmap.h). 701.1Sglass * The actual values may be changed in vminit() based on MAXDSIZ. 711.1Sglass * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024. 721.1Sglass * DMMIN should be at least ctod(1) so that vtod() works. 731.1Sglass * vminit() insures this. 741.1Sglass */ 751.1Sglass#define DMMIN 32 /* smallest swap allocation */ 761.1Sglass#define DMMAX 4096 /* largest potential swap allocation */ 771.1Sglass 781.1Sglass/* 791.4Sglass * PTEs for mapping user space into the kernel for phyio operations. 801.4Sglass * [this figure is based on the assumption that you can put ptes in real 811.4Sglass * memory. this is a false assumption on a sun3] 821.4Sglass * 831.4Sglass */ 841.4Sglass#ifndef USRIOSIZE 851.4Sglass#define USRIOSIZE 1 861.4Sglass#endif 871.4Sglass 881.4Sglass/* 891.1Sglass * The time for a process to be blocked before being very swappable. 901.1Sglass * This is a number of seconds which the system takes as being a non-trivial 911.1Sglass * amount of real time. You probably shouldn't change this; 921.1Sglass * it is used in subtle ways (fractions and multiples of it are, that is, like 931.1Sglass * half of a ``long time'', almost a long time, etc.) 941.1Sglass * It is related to human patience and other factors which don't really 951.1Sglass * change over time. 961.1Sglass */ 971.1Sglass#define MAXSLP 20 981.1Sglass 991.1Sglass/* 1001.1Sglass * A swapped in process is given a small amount of core without being bothered 1011.1Sglass * by the page replacement algorithm. Basically this says that if you are 1021.1Sglass * swapped in you deserve some resources. We protect the last SAFERSS 1031.1Sglass * pages against paging and will just swap you out rather than paging you. 1041.1Sglass * Note that each process has at least UPAGES+CLSIZE pages which are not 1051.1Sglass * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this 1061.1Sglass * number just means a swapped in process is given around 25k bytes. 1071.1Sglass * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81), 1081.1Sglass * so we loan each swapped in process memory worth 100$, or just admit 1091.1Sglass * that we don't consider it worthwhile and swap it out to disk which costs 1101.1Sglass * $30/mb or about $0.75. 1111.1Sglass */ 1121.1Sglass#define SAFERSS 4 /* nominal ``small'' resident set size 1131.1Sglass protected against replacement */ 1141.1Sglass 1151.5Sglass#define DVMA_SPACE_SIZE 0x00100000 1161.5Sglass#define DVMA_SPACE_START 0x0FD00000 1171.5Sglass#define DVMA_SPACE_END 0x0FE00000 /* mon start */ 1181.1Sglass 1191.1Sglass/* 1201.1Sglass * Mach derived constants 1211.1Sglass */ 1221.1Sglass 1231.1Sglass/* user/kernel map constants */ 1241.1Sglass#define VM_MIN_ADDRESS ((vm_offset_t)0) 1251.2Sglass#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x0E000000) 1261.6Sglass#define VM_MAX_ADDRESS ((vm_offset_t)0x0FFF00000) 1271.8Sglass#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0x0E000000) 1281.6Sglass#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0x0FD00000) /* dvma start */ 1291.1Sglass 1301.1Sglass/* virtual sizes (bytes) for various kernel submaps */ 1311.1Sglass#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) 1321.1Sglass#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES) 1331.1Sglass#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES) 134