1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright (c) 1987-1998,2001 by Sun Microsystems, Inc. 24*0Sstevel@tonic-gate * All rights reserved. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #ifndef _SUN4_VMPARAM_H 28*0Sstevel@tonic-gate #define _SUN4_VMPARAM_H 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #ifdef __cplusplus 33*0Sstevel@tonic-gate extern "C" { 34*0Sstevel@tonic-gate #endif 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate #include <sun4/param.h> 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate /* 39*0Sstevel@tonic-gate * Machine dependent constants for Sun-4 40*0Sstevel@tonic-gate */ 41*0Sstevel@tonic-gate 42*0Sstevel@tonic-gate /* 43*0Sstevel@tonic-gate * USRTEXT is the start of the user text/data space, while USRSTACK 44*0Sstevel@tonic-gate * is the top (end) of the user stack. 45*0Sstevel@tonic-gate */ 46*0Sstevel@tonic-gate #define USRTEXT 0x2000 47*0Sstevel@tonic-gate #define USRSTACK KERNELBASE 48*0Sstevel@tonic-gate 49*0Sstevel@tonic-gate /* 50*0Sstevel@tonic-gate * Virtual memory related constants for UNIX resource control, all in bytes 51*0Sstevel@tonic-gate * The default stack size of 8M allows an optimization of mmu mapping 52*0Sstevel@tonic-gate * resources so that in normal use a single mmu region map entry (smeg) 53*0Sstevel@tonic-gate * can be used to map both the stack and shared libraries 54*0Sstevel@tonic-gate */ 55*0Sstevel@tonic-gate #define DFLSSIZ (8*1024*1024) /* initial stack size limit */ 56*0Sstevel@tonic-gate 57*0Sstevel@tonic-gate #define DFLDSIZ_260 ((512*1024*1024)-USRTEXT) /* initial data size limit */ 58*0Sstevel@tonic-gate #define MAXDSIZ_260 ((512*1024*1024)-USRTEXT) /* max data size limit */ 59*0Sstevel@tonic-gate #define MAXSSIZ_260 ((512*1024*1024)-KERNELSIZE) /* max stack size limit */ 60*0Sstevel@tonic-gate 61*0Sstevel@tonic-gate #define DFLDSIZ_470 ((2048*1024*1024)-USRTEXT) /* initial data size limit */ 62*0Sstevel@tonic-gate #define MAXDSIZ_470 ((2048*1024*1024)-USRTEXT) /* max data size limit */ 63*0Sstevel@tonic-gate #define MAXSSIZ_470 ((2048*1024*1024)-KERNELSIZE) /* max stack size limit */ 64*0Sstevel@tonic-gate 65*0Sstevel@tonic-gate #define DFLDSIZ dfldsiz 66*0Sstevel@tonic-gate #define MAXDSIZ maxdsiz 67*0Sstevel@tonic-gate #define MAXSSIZ maxssiz 68*0Sstevel@tonic-gate 69*0Sstevel@tonic-gate #ifndef LOCORE 70*0Sstevel@tonic-gate extern unsigned int dfldsiz; 71*0Sstevel@tonic-gate extern unsigned int maxdsiz; 72*0Sstevel@tonic-gate extern unsigned int maxssiz; 73*0Sstevel@tonic-gate #endif /* !LOCORE */ 74*0Sstevel@tonic-gate 75*0Sstevel@tonic-gate #define SSIZE 1 /* initial stack size */ 76*0Sstevel@tonic-gate #define SINCR 1 /* increment of stack */ 77*0Sstevel@tonic-gate 78*0Sstevel@tonic-gate /* 79*0Sstevel@tonic-gate * Size of the kernel segkmem system pte table. This virtual 80*0Sstevel@tonic-gate * space is controlled by the resource map "kernelmap". 81*0Sstevel@tonic-gate */ 82*0Sstevel@tonic-gate #define SYSPTSIZE (0x640000 / MMU_PAGESIZE) 83*0Sstevel@tonic-gate 84*0Sstevel@tonic-gate /* 85*0Sstevel@tonic-gate * Minimum allowable virtual address space to be used 86*0Sstevel@tonic-gate * by the seg_map segment driver for fast kernel mappings. 87*0Sstevel@tonic-gate */ 88*0Sstevel@tonic-gate #define MINMAPSIZE 0x200000 89*0Sstevel@tonic-gate 90*0Sstevel@tonic-gate /* 91*0Sstevel@tonic-gate * The time for a process to be blocked before being very swappable. 92*0Sstevel@tonic-gate * This is a number of seconds which the system takes as being a non-trivial 93*0Sstevel@tonic-gate * amount of real time. You probably shouldn't change this; 94*0Sstevel@tonic-gate * it is used in subtle ways (fractions and multiples of it are, that is, like 95*0Sstevel@tonic-gate * half of a ``long time'', almost a long time, etc.) 96*0Sstevel@tonic-gate * It is related to human patience and other factors which don't really 97*0Sstevel@tonic-gate * change over time. 98*0Sstevel@tonic-gate */ 99*0Sstevel@tonic-gate #define MAXSLP 20 100*0Sstevel@tonic-gate 101*0Sstevel@tonic-gate /* 102*0Sstevel@tonic-gate * A swapped in process is given a small amount of core without being bothered 103*0Sstevel@tonic-gate * by the page replacement algorithm. Basically this says that if you are 104*0Sstevel@tonic-gate * swapped in you deserve some resources. We protect the last SAFERSS 105*0Sstevel@tonic-gate * pages against paging and will just swap you out rather than paging you. 106*0Sstevel@tonic-gate * Note that each process has at least UPAGES pages which are not 107*0Sstevel@tonic-gate * paged anyways so this number just means a swapped in process is 108*0Sstevel@tonic-gate * given around 32k bytes. 109*0Sstevel@tonic-gate */ 110*0Sstevel@tonic-gate #define SAFERSS 3 111*0Sstevel@tonic-gate 112*0Sstevel@tonic-gate /* 113*0Sstevel@tonic-gate * DISKRPM is used to estimate the number of paging i/o operations 114*0Sstevel@tonic-gate * which one can expect from a single disk controller. 115*0Sstevel@tonic-gate */ 116*0Sstevel@tonic-gate #define DISKRPM 60 117*0Sstevel@tonic-gate 118*0Sstevel@tonic-gate /* 119*0Sstevel@tonic-gate * Paging thresholds (see vm_pageout.c). 120*0Sstevel@tonic-gate * Strategy of 3/17/83: 121*0Sstevel@tonic-gate * lotsfree is 256k bytes, but at most 1/8 of memory 122*0Sstevel@tonic-gate * desfree is 100k bytes, but at most 1/16 of memory 123*0Sstevel@tonic-gate * minfree is 32k bytes, but at most 1/2 of desfree 124*0Sstevel@tonic-gate */ 125*0Sstevel@tonic-gate #define LOTSFREE (256 * 1024) 126*0Sstevel@tonic-gate #define LOTSFREEFRACT 8 127*0Sstevel@tonic-gate #define DESFREE (100 * 1024) 128*0Sstevel@tonic-gate #define DESFREEFRACT 16 129*0Sstevel@tonic-gate #define MINFREE (32 * 1024) 130*0Sstevel@tonic-gate #define MINFREEFRACT 2 131*0Sstevel@tonic-gate 132*0Sstevel@tonic-gate /* 133*0Sstevel@tonic-gate * There are two clock hands, initially separated by HANDSPREAD bytes 134*0Sstevel@tonic-gate * (but at most all of user memory). The amount of time to reclaim 135*0Sstevel@tonic-gate * a page once the pageout process examines it increases with this 136*0Sstevel@tonic-gate * distance and decreases as the scan rate rises. 137*0Sstevel@tonic-gate */ 138*0Sstevel@tonic-gate #define HANDSPREAD (2 * 1024 * 1024) 139*0Sstevel@tonic-gate 140*0Sstevel@tonic-gate /* 141*0Sstevel@tonic-gate * Paged text files that are less than PGTHRESH bytes 142*0Sstevel@tonic-gate * may be "prefaulted in" instead of demand paged. 143*0Sstevel@tonic-gate */ 144*0Sstevel@tonic-gate #define PGTHRESH (280 * 1024) 145*0Sstevel@tonic-gate 146*0Sstevel@tonic-gate #ifdef __cplusplus 147*0Sstevel@tonic-gate } 148*0Sstevel@tonic-gate #endif 149*0Sstevel@tonic-gate 150*0Sstevel@tonic-gate #endif /* !_SUN4_VMPARAM_H */ 151