Home | History | Annotate | Download | only in sys
      1     0    stevel /*
      2     0    stevel  * CDDL HEADER START
      3     0    stevel  *
      4     0    stevel  * The contents of this file are subject to the terms of the
      5  3290  johansen  * Common Development and Distribution License (the "License").
      6  3290  johansen  * You may not use this file except in compliance with the License.
      7     0    stevel  *
      8     0    stevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9     0    stevel  * or http://www.opensolaris.org/os/licensing.
     10     0    stevel  * See the License for the specific language governing permissions
     11     0    stevel  * and limitations under the License.
     12     0    stevel  *
     13     0    stevel  * When distributing Covered Code, include this CDDL HEADER in each
     14     0    stevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15     0    stevel  * If applicable, add the following below this CDDL HEADER, with the
     16     0    stevel  * fields enclosed by brackets "[]" replaced with your own identifying
     17     0    stevel  * information: Portions Copyright [yyyy] [name of copyright owner]
     18     0    stevel  *
     19     0    stevel  * CDDL HEADER END
     20     0    stevel  */
     21     0    stevel /*	Copyright (c) 1988 AT&T	*/
     22     0    stevel /*	  All Rights Reserved  	*/
     23     0    stevel 
     24     0    stevel /*
     25  3552  johansen  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     26  3290  johansen  * Use is subject to license terms.
     27     0    stevel  */
     28     0    stevel 
     29     0    stevel #ifndef _SYS_VM_MACHPARAM_H
     30     0    stevel #define	_SYS_VM_MACHPARAM_H
     31     0    stevel 
     32     0    stevel #pragma ident	"%Z%%M%	%I%	%E% SMI"
     33     0    stevel 
     34     0    stevel #ifdef	__cplusplus
     35     0    stevel extern "C" {
     36     0    stevel #endif
     37     0    stevel 
     38     0    stevel /*
     39     0    stevel  * Machine dependent constants for sun4u.
     40     0    stevel  */
     41     0    stevel 
     42     0    stevel /*
     43     0    stevel  * USRTEXT is the start of the user text/data space.
     44     0    stevel  */
     45     0    stevel #define	USRTEXT		0x2000
     46     0    stevel 
     47     0    stevel /*
     48     0    stevel  * Virtual memory related constants for UNIX resource control, all in bytes
     49     0    stevel  * The default stack size of 8M allows an optimization of mmu mapping
     50     0    stevel  * resources so that in normal use a single mmu region map entry (smeg)
     51     0    stevel  * can be used to map both the stack and shared libraries
     52     0    stevel  */
     53     0    stevel #define	MAXSSIZ		(0x7ffff000)	/* max stack size limit */
     54     0    stevel #define	DFLSSIZ		(8*1024*1024)	/* initial stack size limit */
     55     0    stevel 
     56     0    stevel /*
     57     0    stevel  * DSIZE_LIMIT and SSIZE_LIMIT exist to work-around an SVVS bug (1094085),
     58     0    stevel  * and should be removed from the kernel (1094089)
     59     0    stevel  */
     60     0    stevel 
     61     0    stevel #define	DSIZE_LIMIT	(USERLIMIT-USRTEXT)	/* physical data limit */
     62     0    stevel #define	SSIZE_LIMIT	(0x7fffffff)	/* physical stack limit */
     63     0    stevel 
     64     0    stevel /*
     65     0    stevel  * Minimum allowable virtual address space to be used
     66     0    stevel  * by the seg_map segment driver for fast kernel mappings.
     67     0    stevel  */
     68     0    stevel #define	MINMAPSIZE	0x200000
     69     0    stevel 
     70     0    stevel /*
     71     0    stevel  * The virtual address space to be used by the seg_map segment
     72     0    stevel  * driver for fast kernel mappings.
     73     0    stevel  *
     74     0    stevel  * Size is 1/8th of physmem at boot.
     75     0    stevel  */
     76     0    stevel 
     77     0    stevel #ifdef	_LP64
     78     0    stevel #define	SEGMAPSIZE	(256L * 1024L * 1024L * 1024L)	/* 256G */
     79     0    stevel #else
     80     0    stevel #define	SEGMAPSIZE	(256 * 1024 * 1024)		/* 256M */
     81     0    stevel #endif	/* _LP64 */
     82     0    stevel 
     83     0    stevel /*
     84     0    stevel  * Define the default virtual size and valid size range for the segkp segment.
     85     0    stevel  */
     86     0    stevel #ifdef	_LP64
     87     0    stevel #define	SEGKPDEFSIZE	(2L * 1024L * 1024L * 1024L)		/*   2G */
     88     0    stevel #define	SEGKPMAXSIZE	(24L * 1024L * 1024L * 1024L)		/*  24G */
     89     0    stevel #define	SEGKPMINSIZE	(512L * 1024 * 1024L)			/* 512M */
     90     0    stevel #else
     91     0    stevel #define	SEGKPDEFSIZE	(512 * 1024 * 1024)
     92     0    stevel #define	SEGKPMAXSIZE	(512 * 1024 * 1024)
     93     0    stevel #define	SEGKPMINSIZE	(512 * 1024 * 1024)
     94     0    stevel #endif	/* _LP64 */
     95     0    stevel 
     96     0    stevel /*
     97  3290  johansen  * Define minimum size for zio segment
     98  3290  johansen  */
     99  3552  johansen #define	SEGZIOMINSIZE	(512L * 1024L * 1024L)			/* 512M */
    100  3552  johansen #define	SEGZIOMAXSIZE	(512L * 1024L * 1024L * 1024L)		/* 512G */
    101  3290  johansen 
    102  3290  johansen /*
    103     0    stevel  * The time for a process to be blocked before being very swappable.
    104     0    stevel  * This is a number of seconds which the system takes as being a non-trivial
    105     0    stevel  * amount of real time. You probably shouldn't change this;
    106     0    stevel  * it is used in subtle ways (fractions and multiples of it are, that is, like
    107     0    stevel  * half of a ``long time'', almost a long time, etc.)
    108     0    stevel  * It is related to human patience and other factors which don't really
    109     0    stevel  * change over time.
    110     0    stevel  */
    111     0    stevel #define	MAXSLP 		20
    112     0    stevel 
    113     0    stevel /*
    114     0    stevel  * A swapped in process is given a small amount of core without being bothered
    115     0    stevel  * by the page replacement algorithm. Basically this says that if you are
    116     0    stevel  * swapped in you deserve some resources. We protect the last SAFERSS
    117     0    stevel  * pages against paging and will just swap you out rather than paging you.
    118     0    stevel  * Note that each process has at least UPAGES pages which are not
    119     0    stevel  * paged anyways so this number just means a swapped in process is
    120     0    stevel  * given around 32k bytes.
    121     0    stevel  */
    122     0    stevel /*
    123     0    stevel  * nominal ``small'' resident set size
    124     0    stevel  * protected against replacement
    125     0    stevel  */
    126     0    stevel #define	SAFERSS		3
    127     0    stevel 
    128     0    stevel /*
    129     0    stevel  * DISKRPM is used to estimate the number of paging i/o operations
    130     0    stevel  * which one can expect from a single disk controller.
    131     0    stevel  *
    132     0    stevel  * XXX - The system doesn't account for multiple swap devices.
    133     0    stevel  */
    134     0    stevel #define	DISKRPM		60
    135     0    stevel 
    136     0    stevel /*
    137     0    stevel  * The maximum value for handspreadpages which is the the distance
    138     0    stevel  * between the two clock hands in pages.
    139     0    stevel  */
    140     0    stevel #define	MAXHANDSPREADPAGES	((64 * 1024 * 1024) / PAGESIZE)
    141     0    stevel 
    142     0    stevel /*
    143     0    stevel  * Paged text files that are less than PGTHRESH bytes
    144     0    stevel  * may be "prefaulted in" instead of demand paged.
    145     0    stevel  */
    146     0    stevel #define	PGTHRESH	(280 * 1024)
    147     0    stevel 
    148     0    stevel /*
    149     0    stevel  * Cacheable bit for 64 bit MXCC Stream Source registers
    150     0    stevel  */
    151     0    stevel #define	BC_CACHE_SHIFT	36
    152     0    stevel 
    153     0    stevel /*
    154     0    stevel  * set type for 64 bit phys addr variables.  Needed at least for interface
    155     0    stevel  * with MXCC.
    156     0    stevel  */
    157     0    stevel 
    158     0    stevel #ifndef _ASM
    159     0    stevel typedef unsigned long long pa_t;
    160     0    stevel #endif
    161     0    stevel 
    162     0    stevel #ifdef	__cplusplus
    163     0    stevel }
    164     0    stevel #endif
    165     0    stevel 
    166     0    stevel #endif	/* _SYS_VM_MACHPARAM_H */
    167