1*e55ab885Smickey /* $OpenBSD: vmparam.h,v 1.1 1998/07/07 21:32:45 mickey Exp $ */ 2*e55ab885Smickey 3*e55ab885Smickey /* 4*e55ab885Smickey * Copyright (c) 1988-1994, The University of Utah and 5*e55ab885Smickey * the Computer Systems Laboratory at the University of Utah (CSL). 6*e55ab885Smickey * All rights reserved. 7*e55ab885Smickey * 8*e55ab885Smickey * Permission to use, copy, modify and distribute this software is hereby 9*e55ab885Smickey * granted provided that (1) source code retains these copyright, permission, 10*e55ab885Smickey * and disclaimer notices, and (2) redistributions including binaries 11*e55ab885Smickey * reproduce the notices in supporting documentation, and (3) all advertising 12*e55ab885Smickey * materials mentioning features or use of this software display the following 13*e55ab885Smickey * acknowledgement: ``This product includes software developed by the 14*e55ab885Smickey * Computer Systems Laboratory at the University of Utah.'' 15*e55ab885Smickey * 16*e55ab885Smickey * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 17*e55ab885Smickey * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 18*e55ab885Smickey * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 19*e55ab885Smickey * 20*e55ab885Smickey * CSL requests users of this software to return to csl-dist@cs.utah.edu any 21*e55ab885Smickey * improvements that they make and grant CSL redistribution rights. 22*e55ab885Smickey * 23*e55ab885Smickey * Utah $Hdr: vmparam.h 1.16 94/12/16$ 24*e55ab885Smickey */ 25*e55ab885Smickey 26*e55ab885Smickey #ifndef _HPPA_VMPARAM_H_ 27*e55ab885Smickey #define _HPPA_VMPARAM_H_ 28*e55ab885Smickey 29*e55ab885Smickey /* 30*e55ab885Smickey * Machine dependent constants for HP PA 31*e55ab885Smickey */ 32*e55ab885Smickey /* 33*e55ab885Smickey * USRTEXT is the start of the user text/data space, while USRSTACK 34*e55ab885Smickey * is the top (end) of the user stack. LOWPAGES and HIGHPAGES are 35*e55ab885Smickey * the number of pages from the beginning of the P0 region to the 36*e55ab885Smickey * beginning of the text and from the beginning of the P1 region to the 37*e55ab885Smickey * beginning of the stack respectively. 38*e55ab885Smickey */ 39*e55ab885Smickey #define USRTEXT UTEXTSEG 40*e55ab885Smickey #define USRSTACK 0x68FF3000 /* Start of user stack */ 41*e55ab885Smickey #define BTOPUSRSTACK btop(USRSTACK) /* btop(USRSTACK) */ 42*e55ab885Smickey #define P1PAGES 0 43*e55ab885Smickey #define LOWPAGES 0 44*e55ab885Smickey #define HIGHPAGES UPAGES 45*e55ab885Smickey 46*e55ab885Smickey #define INTSTACK_SIZE (5 * NBPG) /* interrupt stack size */ 47*e55ab885Smickey 48*e55ab885Smickey /* 49*e55ab885Smickey * Virtual memory related constants, all in bytes 50*e55ab885Smickey */ 51*e55ab885Smickey #ifndef MAXTSIZ 52*e55ab885Smickey #define MAXTSIZ (16*1024*1024) /* max text size */ 53*e55ab885Smickey #endif 54*e55ab885Smickey #ifndef DFLDSIZ 55*e55ab885Smickey #define DFLDSIZ (16*1024*1024) /* initial data size limit */ 56*e55ab885Smickey #endif 57*e55ab885Smickey #ifndef MAXDSIZ 58*e55ab885Smickey #define MAXDSIZ (64*1024*1024) /* max data size */ 59*e55ab885Smickey #endif 60*e55ab885Smickey #ifndef DFLSSIZ 61*e55ab885Smickey #define DFLSSIZ (512*1024) /* initial stack size limit */ 62*e55ab885Smickey #endif 63*e55ab885Smickey #ifndef MAXSSIZ 64*e55ab885Smickey #define MAXSSIZ MAXDSIZ /* max stack size */ 65*e55ab885Smickey #endif 66*e55ab885Smickey 67*e55ab885Smickey /* 68*e55ab885Smickey * Default sizes of swap allocation chunks (see dmap.h). 69*e55ab885Smickey * The actual values may be changed in vminit() based on MAXDSIZ. 70*e55ab885Smickey * With MAXDSIZ of 64Mb and NDMAP of 62, dmmax will be 4096. 71*e55ab885Smickey * DMMIN should be at least ctod(1) so that vtod() works. 72*e55ab885Smickey * vminit() ensures this. 73*e55ab885Smickey */ 74*e55ab885Smickey #define DMMIN 64 /* smallest swap allocation */ 75*e55ab885Smickey #define DMMAX 4096 /* largest potential swap allocation */ 76*e55ab885Smickey #define DMTEXT 4096 /* swap allocation for text */ 77*e55ab885Smickey 78*e55ab885Smickey /* 79*e55ab885Smickey * Sizes of the system and user portions of the system page table. 80*e55ab885Smickey */ 81*e55ab885Smickey /* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */ 82*e55ab885Smickey #define SYSPTSIZE ((1024*1024*64)/NBPG) /* 64mb */ 83*e55ab885Smickey #define USRPTSIZE (8 * NPTEPG) /* 32mb */ 84*e55ab885Smickey 85*e55ab885Smickey /* 86*e55ab885Smickey * PTEs for system V style shared memory. 87*e55ab885Smickey * This is basically slop for kmempt which we actually allocate (malloc) from. 88*e55ab885Smickey */ 89*e55ab885Smickey #ifndef SHMMAXPGS 90*e55ab885Smickey #define SHMMAXPGS ((1024*1024*10)/NBPG) /* 10mb */ 91*e55ab885Smickey #endif 92*e55ab885Smickey 93*e55ab885Smickey /* 94*e55ab885Smickey * The size of the clock loop. 95*e55ab885Smickey */ 96*e55ab885Smickey #define LOOPPAGES (maxfree - firstfree) 97*e55ab885Smickey 98*e55ab885Smickey /* 99*e55ab885Smickey * The time for a process to be blocked before being very swappable. 100*e55ab885Smickey * This is a number of seconds which the system takes as being a non-trivial 101*e55ab885Smickey * amount of real time. You probably shouldn't change this; 102*e55ab885Smickey * it is used in subtle ways (fractions and multiples of it are, that is, like 103*e55ab885Smickey * half of a ``long time'', almost a long time, etc.) 104*e55ab885Smickey * It is related to human patience and other factors which don't really 105*e55ab885Smickey * change over time. 106*e55ab885Smickey */ 107*e55ab885Smickey #define MAXSLP 20 108*e55ab885Smickey 109*e55ab885Smickey /* 110*e55ab885Smickey * A swapped in process is given a small amount of core without being bothered 111*e55ab885Smickey * by the page replacement algorithm. Basically this says that if you are 112*e55ab885Smickey * swapped in you deserve some resources. We protect the last SAFERSS 113*e55ab885Smickey * pages against paging and will just swap you out rather than paging you. 114*e55ab885Smickey * Note that each process has at least UPAGES+CLSIZE pages which are not 115*e55ab885Smickey * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this 116*e55ab885Smickey * number just means a swapped in process is given around 25k bytes. 117*e55ab885Smickey * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81), 118*e55ab885Smickey * so we loan each swapped in process memory worth 100$, or just admit 119*e55ab885Smickey * that we don't consider it worthwhile and swap it out to disk which costs 120*e55ab885Smickey * $30/mb or about $0.75. 121*e55ab885Smickey */ 122*e55ab885Smickey #define SAFERSS (16384/NBPG) /* nominal ``small'' resident set size 123*e55ab885Smickey protected against replacement */ 124*e55ab885Smickey 125*e55ab885Smickey /* user/kernel map constants */ 126*e55ab885Smickey #define VM_MIN_ADDRESS ((vm_offset_t)0) 127*e55ab885Smickey #define VM_MAXUSER_ADDRESS ((vm_offset_t)0xc0000000) 128*e55ab885Smickey #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 129*e55ab885Smickey #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0) 130*e55ab885Smickey #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFFFF0000) 131*e55ab885Smickey 132*e55ab885Smickey /* virtual sizes (bytes) for various kernel submaps */ 133*e55ab885Smickey #define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) 134*e55ab885Smickey #define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES) 135*e55ab885Smickey #define VM_PHYS_SIZE (USRIOSIZE*CLBYTES) 136*e55ab885Smickey 137*e55ab885Smickey #endif /* _HPPA_VMPARAM_H_ */ 138