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