xref: /original-bsd/sys/sparc/include/vmparam.h (revision 13deef58)
1 /*
2  * Copyright (c) 1992 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This software was developed by the Computer Systems Engineering group
6  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
7  * contributed to Berkeley.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)vmparam.h	7.1 (Berkeley) 07/13/92
12  *
13  * from: $Header: vmparam.h,v 1.6 92/06/24 08:55:18 torek Exp $
14  */
15 
16 /*
17  * Machine dependent constants for Sun-4c SPARC
18  */
19 
20 /*
21  * USRTEXT is the start of the user text/data space, while USRSTACK
22  * is the top (end) of the user stack.
23  */
24 #define	USRTEXT		0x2000			/* Start of user text */
25 #define	USRSTACK	KERNBASE		/* Start of user stack */
26 
27 /*
28  * Virtual memory related constants, all in bytes
29  */
30 #ifndef MAXTSIZ
31 #define	MAXTSIZ		(6*1024*1024)		/* max text size */
32 #endif
33 #ifndef DFLDSIZ
34 #define	DFLDSIZ		(8*1024*1024)		/* initial data size limit */
35 #endif
36 #ifndef MAXDSIZ
37 #define	MAXDSIZ		(16*1024*1024)		/* max data size */
38 #endif
39 #ifndef	DFLSSIZ
40 #define	DFLSSIZ		(512*1024)		/* initial stack size limit */
41 #endif
42 #ifndef	MAXSSIZ
43 #define	MAXSSIZ		MAXDSIZ			/* max stack size */
44 #endif
45 
46 /*
47  * Default sizes of swap allocation chunks (see dmap.h).
48  * The actual values may be changed in vminit() based on MAXDSIZ.
49  * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024.
50  * DMMIN should be at least ctod(1) so that vtod() works.
51  * vminit() insures this.
52  */
53 #define	DMMIN	32			/* smallest swap allocation */
54 #define	DMMAX	4096			/* largest potential swap allocation */
55 #define	DMTEXT	1024			/* swap allocation for text */
56 
57 /*
58  * The time for a process to be blocked before being very swappable.
59  * This is a number of seconds which the system takes as being a non-trivial
60  * amount of real time.  You probably shouldn't change this;
61  * it is used in subtle ways (fractions and multiples of it are, that is, like
62  * half of a ``long time'', almost a long time, etc.)
63  * It is related to human patience and other factors which don't really
64  * change over time.
65  */
66 #define	MAXSLP 		20
67 
68 /*
69  * A swapped in process is given a small amount of core without being bothered
70  * by the page replacement algorithm.  Basically this says that if you are
71  * swapped in you deserve some resources.  We protect the last SAFERSS
72  * pages against paging and will just swap you out rather than paging you.
73  * Note that each process has at least UPAGES+CLSIZE pages which are not
74  * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
75  * number just means a swapped in process is given around 25k bytes.
76  * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
77  * so we loan each swapped in process memory worth 100$, or just admit
78  * that we don't consider it worthwhile and swap it out to disk which costs
79  * $30/mb or about $0.75.
80  */
81 #define	SAFERSS		4		/* nominal ``small'' resident set size
82 					   protected against replacement */
83 
84 /*
85  * Mach derived constants
86  */
87 
88 /*
89  * User/kernel map constants.  Note that sparc/vaddrs.h defines the
90  * IO space virtual base, which must be the same as VM_MAX_KERNEL_ADDRESS:
91  * tread with care.
92  */
93 #define VM_MIN_ADDRESS		((vm_offset_t)0x2000)	/* texts start at 8K */
94 #define VM_MAX_ADDRESS		((vm_offset_t)KERNBASE)
95 #define VM_MAXUSER_ADDRESS	((vm_offset_t)KERNBASE)
96 #define VM_MIN_KERNEL_ADDRESS	((vm_offset_t)KERNBASE)
97 #define VM_MAX_KERNEL_ADDRESS	((vm_offset_t)0xfe000000)
98 
99 /* virtual sizes (bytes) for various kernel submaps */
100 #define VM_MBUF_SIZE		(NMBCLUSTERS*MCLBYTES)
101 #define VM_KMEM_SIZE		(NKMEMCLUSTERS*CLBYTES)
102