17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5ad23a2dbSjohansen * Common Development and Distribution License (the "License"). 6ad23a2dbSjohansen * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 227c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 237c478bd9Sstevel@tonic-gate 247c478bd9Sstevel@tonic-gate /* 25*a778305aSjohansen * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 26ad23a2dbSjohansen * Use is subject to license terms. 277c478bd9Sstevel@tonic-gate */ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #ifndef _SYS_VM_MACHPARAM_H 307c478bd9Sstevel@tonic-gate #define _SYS_VM_MACHPARAM_H 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 337c478bd9Sstevel@tonic-gate extern "C" { 347c478bd9Sstevel@tonic-gate #endif 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate /* 377c478bd9Sstevel@tonic-gate * Machine dependent constants for sun4u. 387c478bd9Sstevel@tonic-gate */ 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate /* 417c478bd9Sstevel@tonic-gate * USRTEXT is the start of the user text/data space. 427c478bd9Sstevel@tonic-gate */ 437c478bd9Sstevel@tonic-gate #define USRTEXT 0x2000 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate /* 467c478bd9Sstevel@tonic-gate * Virtual memory related constants for UNIX resource control, all in bytes 477c478bd9Sstevel@tonic-gate * The default stack size of 8M allows an optimization of mmu mapping 487c478bd9Sstevel@tonic-gate * resources so that in normal use a single mmu region map entry (smeg) 497c478bd9Sstevel@tonic-gate * can be used to map both the stack and shared libraries 507c478bd9Sstevel@tonic-gate */ 517c478bd9Sstevel@tonic-gate #define MAXSSIZ (0x7ffff000) /* max stack size limit */ 527c478bd9Sstevel@tonic-gate #define DFLSSIZ (8*1024*1024) /* initial stack size limit */ 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate /* 557c478bd9Sstevel@tonic-gate * Minimum allowable virtual address space to be used 567c478bd9Sstevel@tonic-gate * by the seg_map segment driver for fast kernel mappings. 577c478bd9Sstevel@tonic-gate */ 587c478bd9Sstevel@tonic-gate #define MINMAPSIZE 0x200000 597c478bd9Sstevel@tonic-gate 607c478bd9Sstevel@tonic-gate /* 617c478bd9Sstevel@tonic-gate * The virtual address space to be used by the seg_map segment 627c478bd9Sstevel@tonic-gate * driver for fast kernel mappings. 637c478bd9Sstevel@tonic-gate * 647c478bd9Sstevel@tonic-gate * Size is 1/8th of physmem at boot. 657c478bd9Sstevel@tonic-gate */ 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate #ifdef _LP64 687c478bd9Sstevel@tonic-gate #define SEGMAPSIZE (256L * 1024L * 1024L * 1024L) /* 256G */ 697c478bd9Sstevel@tonic-gate #else 707c478bd9Sstevel@tonic-gate #define SEGMAPSIZE (256 * 1024 * 1024) /* 256M */ 717c478bd9Sstevel@tonic-gate #endif /* _LP64 */ 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gate /* 747c478bd9Sstevel@tonic-gate * Define the default virtual size and valid size range for the segkp segment. 757c478bd9Sstevel@tonic-gate */ 767c478bd9Sstevel@tonic-gate #ifdef _LP64 777c478bd9Sstevel@tonic-gate #define SEGKPDEFSIZE (2L * 1024L * 1024L * 1024L) /* 2G */ 787c478bd9Sstevel@tonic-gate #define SEGKPMAXSIZE (24L * 1024L * 1024L * 1024L) /* 24G */ 797c478bd9Sstevel@tonic-gate #define SEGKPMINSIZE (512L * 1024 * 1024L) /* 512M */ 807c478bd9Sstevel@tonic-gate #else 817c478bd9Sstevel@tonic-gate #define SEGKPDEFSIZE (512 * 1024 * 1024) 827c478bd9Sstevel@tonic-gate #define SEGKPMAXSIZE (512 * 1024 * 1024) 837c478bd9Sstevel@tonic-gate #define SEGKPMINSIZE (512 * 1024 * 1024) 847c478bd9Sstevel@tonic-gate #endif /* _LP64 */ 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate /* 87ad23a2dbSjohansen * Define minimum size for zio segment 88ad23a2dbSjohansen */ 89*a778305aSjohansen #define SEGZIOMINSIZE (512L * 1024L * 1024L) /* 512M */ 90*a778305aSjohansen #define SEGZIOMAXSIZE (512L * 1024L * 1024L * 1024L) /* 512G */ 91ad23a2dbSjohansen 92ad23a2dbSjohansen /* 937c478bd9Sstevel@tonic-gate * The time for a process to be blocked before being very swappable. 947c478bd9Sstevel@tonic-gate * This is a number of seconds which the system takes as being a non-trivial 957c478bd9Sstevel@tonic-gate * amount of real time. You probably shouldn't change this; 967c478bd9Sstevel@tonic-gate * it is used in subtle ways (fractions and multiples of it are, that is, like 977c478bd9Sstevel@tonic-gate * half of a ``long time'', almost a long time, etc.) 987c478bd9Sstevel@tonic-gate * It is related to human patience and other factors which don't really 997c478bd9Sstevel@tonic-gate * change over time. 1007c478bd9Sstevel@tonic-gate */ 1017c478bd9Sstevel@tonic-gate #define MAXSLP 20 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate /* 1047c478bd9Sstevel@tonic-gate * A swapped in process is given a small amount of core without being bothered 1057c478bd9Sstevel@tonic-gate * by the page replacement algorithm. Basically this says that if you are 1067c478bd9Sstevel@tonic-gate * swapped in you deserve some resources. We protect the last SAFERSS 1077c478bd9Sstevel@tonic-gate * pages against paging and will just swap you out rather than paging you. 1087c478bd9Sstevel@tonic-gate * Note that each process has at least UPAGES pages which are not 1097c478bd9Sstevel@tonic-gate * paged anyways so this number just means a swapped in process is 1107c478bd9Sstevel@tonic-gate * given around 32k bytes. 1117c478bd9Sstevel@tonic-gate */ 1127c478bd9Sstevel@tonic-gate /* 1137c478bd9Sstevel@tonic-gate * nominal ``small'' resident set size 1147c478bd9Sstevel@tonic-gate * protected against replacement 1157c478bd9Sstevel@tonic-gate */ 1167c478bd9Sstevel@tonic-gate #define SAFERSS 3 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate /* 1197c478bd9Sstevel@tonic-gate * DISKRPM is used to estimate the number of paging i/o operations 1207c478bd9Sstevel@tonic-gate * which one can expect from a single disk controller. 1217c478bd9Sstevel@tonic-gate * 1227c478bd9Sstevel@tonic-gate * XXX - The system doesn't account for multiple swap devices. 1237c478bd9Sstevel@tonic-gate */ 1247c478bd9Sstevel@tonic-gate #define DISKRPM 60 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gate /* 1277c478bd9Sstevel@tonic-gate * The maximum value for handspreadpages which is the the distance 1287c478bd9Sstevel@tonic-gate * between the two clock hands in pages. 1297c478bd9Sstevel@tonic-gate */ 1307c478bd9Sstevel@tonic-gate #define MAXHANDSPREADPAGES ((64 * 1024 * 1024) / PAGESIZE) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate /* 1337c478bd9Sstevel@tonic-gate * Paged text files that are less than PGTHRESH bytes 1347c478bd9Sstevel@tonic-gate * may be "prefaulted in" instead of demand paged. 1357c478bd9Sstevel@tonic-gate */ 1367c478bd9Sstevel@tonic-gate #define PGTHRESH (280 * 1024) 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gate /* 1397c478bd9Sstevel@tonic-gate * Cacheable bit for 64 bit MXCC Stream Source registers 1407c478bd9Sstevel@tonic-gate */ 1417c478bd9Sstevel@tonic-gate #define BC_CACHE_SHIFT 36 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate /* 1447c478bd9Sstevel@tonic-gate * set type for 64 bit phys addr variables. Needed at least for interface 1457c478bd9Sstevel@tonic-gate * with MXCC. 1467c478bd9Sstevel@tonic-gate */ 1477c478bd9Sstevel@tonic-gate 1487c478bd9Sstevel@tonic-gate #ifndef _ASM 1497c478bd9Sstevel@tonic-gate typedef unsigned long long pa_t; 1507c478bd9Sstevel@tonic-gate #endif 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1537c478bd9Sstevel@tonic-gate } 1547c478bd9Sstevel@tonic-gate #endif 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate #endif /* _SYS_VM_MACHPARAM_H */ 157