10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 53290Sjohansen * Common Development and Distribution License (the "License"). 63290Sjohansen * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 220Sstevel@tonic-gate /* All Rights Reserved */ 230Sstevel@tonic-gate 240Sstevel@tonic-gate /* 25*3552Sjohansen * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 263290Sjohansen * Use is subject to license terms. 270Sstevel@tonic-gate */ 280Sstevel@tonic-gate 290Sstevel@tonic-gate #ifndef _SYS_VM_MACHPARAM_H 300Sstevel@tonic-gate #define _SYS_VM_MACHPARAM_H 310Sstevel@tonic-gate 320Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 330Sstevel@tonic-gate 340Sstevel@tonic-gate #ifdef __cplusplus 350Sstevel@tonic-gate extern "C" { 360Sstevel@tonic-gate #endif 370Sstevel@tonic-gate 380Sstevel@tonic-gate /* 390Sstevel@tonic-gate * Machine dependent constants for sun4u. 400Sstevel@tonic-gate */ 410Sstevel@tonic-gate 420Sstevel@tonic-gate /* 430Sstevel@tonic-gate * USRTEXT is the start of the user text/data space. 440Sstevel@tonic-gate */ 450Sstevel@tonic-gate #define USRTEXT 0x2000 460Sstevel@tonic-gate 470Sstevel@tonic-gate /* 480Sstevel@tonic-gate * Virtual memory related constants for UNIX resource control, all in bytes 490Sstevel@tonic-gate * The default stack size of 8M allows an optimization of mmu mapping 500Sstevel@tonic-gate * resources so that in normal use a single mmu region map entry (smeg) 510Sstevel@tonic-gate * can be used to map both the stack and shared libraries 520Sstevel@tonic-gate */ 530Sstevel@tonic-gate #define MAXSSIZ (0x7ffff000) /* max stack size limit */ 540Sstevel@tonic-gate #define DFLSSIZ (8*1024*1024) /* initial stack size limit */ 550Sstevel@tonic-gate 560Sstevel@tonic-gate /* 570Sstevel@tonic-gate * DSIZE_LIMIT and SSIZE_LIMIT exist to work-around an SVVS bug (1094085), 580Sstevel@tonic-gate * and should be removed from the kernel (1094089) 590Sstevel@tonic-gate */ 600Sstevel@tonic-gate 610Sstevel@tonic-gate #define DSIZE_LIMIT (USERLIMIT-USRTEXT) /* physical data limit */ 620Sstevel@tonic-gate #define SSIZE_LIMIT (0x7fffffff) /* physical stack limit */ 630Sstevel@tonic-gate 640Sstevel@tonic-gate /* 650Sstevel@tonic-gate * Minimum allowable virtual address space to be used 660Sstevel@tonic-gate * by the seg_map segment driver for fast kernel mappings. 670Sstevel@tonic-gate */ 680Sstevel@tonic-gate #define MINMAPSIZE 0x200000 690Sstevel@tonic-gate 700Sstevel@tonic-gate /* 710Sstevel@tonic-gate * The virtual address space to be used by the seg_map segment 720Sstevel@tonic-gate * driver for fast kernel mappings. 730Sstevel@tonic-gate * 740Sstevel@tonic-gate * Size is 1/8th of physmem at boot. 750Sstevel@tonic-gate */ 760Sstevel@tonic-gate 770Sstevel@tonic-gate #ifdef _LP64 780Sstevel@tonic-gate #define SEGMAPSIZE (256L * 1024L * 1024L * 1024L) /* 256G */ 790Sstevel@tonic-gate #else 800Sstevel@tonic-gate #define SEGMAPSIZE (256 * 1024 * 1024) /* 256M */ 810Sstevel@tonic-gate #endif /* _LP64 */ 820Sstevel@tonic-gate 830Sstevel@tonic-gate /* 840Sstevel@tonic-gate * Define the default virtual size and valid size range for the segkp segment. 850Sstevel@tonic-gate */ 860Sstevel@tonic-gate #ifdef _LP64 870Sstevel@tonic-gate #define SEGKPDEFSIZE (2L * 1024L * 1024L * 1024L) /* 2G */ 880Sstevel@tonic-gate #define SEGKPMAXSIZE (24L * 1024L * 1024L * 1024L) /* 24G */ 890Sstevel@tonic-gate #define SEGKPMINSIZE (512L * 1024 * 1024L) /* 512M */ 900Sstevel@tonic-gate #else 910Sstevel@tonic-gate #define SEGKPDEFSIZE (512 * 1024 * 1024) 920Sstevel@tonic-gate #define SEGKPMAXSIZE (512 * 1024 * 1024) 930Sstevel@tonic-gate #define SEGKPMINSIZE (512 * 1024 * 1024) 940Sstevel@tonic-gate #endif /* _LP64 */ 950Sstevel@tonic-gate 960Sstevel@tonic-gate /* 973290Sjohansen * Define minimum size for zio segment 983290Sjohansen */ 99*3552Sjohansen #define SEGZIOMINSIZE (512L * 1024L * 1024L) /* 512M */ 100*3552Sjohansen #define SEGZIOMAXSIZE (512L * 1024L * 1024L * 1024L) /* 512G */ 1013290Sjohansen 1023290Sjohansen /* 1030Sstevel@tonic-gate * The time for a process to be blocked before being very swappable. 1040Sstevel@tonic-gate * This is a number of seconds which the system takes as being a non-trivial 1050Sstevel@tonic-gate * amount of real time. You probably shouldn't change this; 1060Sstevel@tonic-gate * it is used in subtle ways (fractions and multiples of it are, that is, like 1070Sstevel@tonic-gate * half of a ``long time'', almost a long time, etc.) 1080Sstevel@tonic-gate * It is related to human patience and other factors which don't really 1090Sstevel@tonic-gate * change over time. 1100Sstevel@tonic-gate */ 1110Sstevel@tonic-gate #define MAXSLP 20 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate /* 1140Sstevel@tonic-gate * A swapped in process is given a small amount of core without being bothered 1150Sstevel@tonic-gate * by the page replacement algorithm. Basically this says that if you are 1160Sstevel@tonic-gate * swapped in you deserve some resources. We protect the last SAFERSS 1170Sstevel@tonic-gate * pages against paging and will just swap you out rather than paging you. 1180Sstevel@tonic-gate * Note that each process has at least UPAGES pages which are not 1190Sstevel@tonic-gate * paged anyways so this number just means a swapped in process is 1200Sstevel@tonic-gate * given around 32k bytes. 1210Sstevel@tonic-gate */ 1220Sstevel@tonic-gate /* 1230Sstevel@tonic-gate * nominal ``small'' resident set size 1240Sstevel@tonic-gate * protected against replacement 1250Sstevel@tonic-gate */ 1260Sstevel@tonic-gate #define SAFERSS 3 1270Sstevel@tonic-gate 1280Sstevel@tonic-gate /* 1290Sstevel@tonic-gate * DISKRPM is used to estimate the number of paging i/o operations 1300Sstevel@tonic-gate * which one can expect from a single disk controller. 1310Sstevel@tonic-gate * 1320Sstevel@tonic-gate * XXX - The system doesn't account for multiple swap devices. 1330Sstevel@tonic-gate */ 1340Sstevel@tonic-gate #define DISKRPM 60 1350Sstevel@tonic-gate 1360Sstevel@tonic-gate /* 1370Sstevel@tonic-gate * The maximum value for handspreadpages which is the the distance 1380Sstevel@tonic-gate * between the two clock hands in pages. 1390Sstevel@tonic-gate */ 1400Sstevel@tonic-gate #define MAXHANDSPREADPAGES ((64 * 1024 * 1024) / PAGESIZE) 1410Sstevel@tonic-gate 1420Sstevel@tonic-gate /* 1430Sstevel@tonic-gate * Paged text files that are less than PGTHRESH bytes 1440Sstevel@tonic-gate * may be "prefaulted in" instead of demand paged. 1450Sstevel@tonic-gate */ 1460Sstevel@tonic-gate #define PGTHRESH (280 * 1024) 1470Sstevel@tonic-gate 1480Sstevel@tonic-gate /* 1490Sstevel@tonic-gate * Cacheable bit for 64 bit MXCC Stream Source registers 1500Sstevel@tonic-gate */ 1510Sstevel@tonic-gate #define BC_CACHE_SHIFT 36 1520Sstevel@tonic-gate 1530Sstevel@tonic-gate /* 1540Sstevel@tonic-gate * set type for 64 bit phys addr variables. Needed at least for interface 1550Sstevel@tonic-gate * with MXCC. 1560Sstevel@tonic-gate */ 1570Sstevel@tonic-gate 1580Sstevel@tonic-gate #ifndef _ASM 1590Sstevel@tonic-gate typedef unsigned long long pa_t; 1600Sstevel@tonic-gate #endif 1610Sstevel@tonic-gate 1620Sstevel@tonic-gate #ifdef __cplusplus 1630Sstevel@tonic-gate } 1640Sstevel@tonic-gate #endif 1650Sstevel@tonic-gate 1660Sstevel@tonic-gate #endif /* _SYS_VM_MACHPARAM_H */ 167