xref: /original-bsd/sys/vax/include/vmparam.h (revision f0fd5f8a)
1 /*	vmparam.h	4.2	82/11/13	*/
2 
3 /*
4  * Machine dependent constants for VAX
5  */
6 /*
7  * USRTEXT is the start of the user text/data space, while USRSTACK
8  * is the top (end) of the user stack.  LOWPAGES and HIGHPAGES are
9  * the number of pages from the beginning of the P0 region to the
10  * beginning of the text and from the beginning of the P1 region to the
11  * beginning of the stack respectively.
12  */
13 					/* number of ptes per page */
14 #define	USRTEXT		0
15 #define	USRSTACK	(0x80000000-UPAGES*NBPG)
16 					/* Start of user stack */
17 #define	P1PAGES		0x200000	/* number of pages in P1 region */
18 #define	LOWPAGES	0
19 #define	HIGHPAGES	UPAGES
20 
21 /*
22  * Virtual memory related constants
23  */
24 #define	SLOP	32
25 #define	MAXTSIZ		(6*2048-SLOP)		/* max text size (clicks) */
26 #ifndef MAXDSIZ
27 #define	MAXDSIZ		(12*1024-32-SLOP)	/* max data size (clicks) */
28 #endif
29 #define	MAXSSIZ		(12*1024-32-SLOP)	/* max stack size (clicks) */
30 
31 /*
32  * Sizes of the system and user portions of the system page table.
33  */
34 /* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */
35 #define	SYSPTSIZE	(35*NPTEPG)
36 #define	USRPTSIZE 	(8*NPTEPG)
37 
38 /*
39  * The size of the clock loop.
40  */
41 #define	LOOPPAGES	(maxfree - firstfree)
42 
43 /*
44  * The time for a process to be blocked before being very swappable.
45  * This is a number of seconds which the system takes as being a non-trivial
46  * amount of real time.  You probably shouldn't change this;
47  * it is used in subtle ways (fractions and multiples of it are, that is, like
48  * half of a ``long time'', almost a long time, etc.)
49  * It is related to human patience and other factors which don't really
50  * change over time.
51  */
52 #define	MAXSLP 		20
53 
54 /*
55  * A swapped in process is given a small amount of core without being bothered
56  * by the page replacement algorithm.  Basically this says that if you are
57  * swapped in you deserve some resources.  We protect the last SAFERSS
58  * pages against paging and will just swap you out rather than paging you.
59  * Note that each process has at least UPAGES+CLSIZE pages which are not
60  * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
61  * number just means a swapped in process is given around 25k bytes.
62  * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
63  * so we loan each swapped in process memory worth 100$, or just admit
64  * that we don't consider it worthwhile and swap it out to disk which costs
65  * $30/mb or about $0.75.
66  */
67 #define	SAFERSS		32		/* nominal ``small'' resident set size
68 					   protected against replacement */
69 
70 /*
71  * DISKRPM is used to estimate the number of paging i/o operations
72  * which one can expect from a single disk controller.
73  */
74 #define	DISKRPM		60
75 
76 /*
77  * Klustering constants.  Klustering is the gathering
78  * of pages together for pagein/pageout, while clustering
79  * is the treatment of hardware page size as though it were
80  * larger than it really is.
81  *
82  * KLMAX gives maximum cluster size in CLSIZE page (cluster-page)
83  * units.  Note that KLMAX*CLSIZE must be <= DMMIN in dmap.h.
84  */
85 
86 #define	KLMAX	(32/CLSIZE)
87 #define	KLSEQL	(16/CLSIZE)		/* in klust if vadvise(VA_SEQL) */
88 #define	KLIN	(8/CLSIZE)		/* default data/stack in klust */
89 #define	KLTXT	(4/CLSIZE)		/* default text in klust */
90 #define	KLOUT	(32/CLSIZE)
91 
92 /*
93  * KLSDIST is the advance or retard of the fifo reclaim for sequential
94  * processes data space.
95  */
96 #define	KLSDIST	3		/* klusters advance/retard for seq. fifo */
97