|
|
1.1 root 1: /* @(#)vmparam.h 1.1 86/02/03 SMI */
2:
3: /*
4: * Copyright (c) 1985 by Sun Microsystems, Inc.
5: */
6:
7: /*
8: * Machine dependent constants for Sun-3
9: */
10:
11: /*
12: * USRTEXT is the start of the user text/data space, while USRSTACK
13: * is the top (end) of the user stack. LOWPAGES and HIGHPAGES are
14: * the number of pages from the beginning of the P0 region to the
15: * beginning of the text and from the end of the stack to the end of the P1
16: * region respectively.
17: */
18: #define USRTEXT NBPG /* start of users text */
19: #define OUSRTEXT 0x8000 /* ... for old Sun-2 a.outs */
20: #define USRSTACK 0x0F000000 /* start of users stack */
21: #define P1PAGES btoc(USRSTACK) /* no of pages in P1 region */
22: #define LOWPAGES btoc(USRTEXT) /* no pages from P0 to text */
23: #define HIGHPAGES 0 /* no pages from P1 to stack */
24:
25: /*
26: * Virtual memory related constants
27: */
28: #define SLOP 32
29: #define MAXTSIZ btoc(32*1024*1024) /* max text size (clicks) */
30: #define MAXDSIZ (btoc(USRSTACK)-SLOP) /* max data size (clicks) */
31: #define MAXSSIZ (btoc(USRSTACK)-SLOP) /* max stack size (clicks) */
32:
33: /*
34: * Sizes of the system and user portions of the system page table.
35: * Note that they point into the kernel virtual address space, hence
36: * what they describe is the size of the table space, not the size of
37: * the space which can be mapped.
38: */
39: #define SYSPTSIZE (0x100000/NBPG)
40: #define USRPTSIZE (0xa00000/NBPG)
41: /*
42: * The size of the clock loop.
43: */
44: #define LOOPPAGES (maxfree - firstfree)
45:
46: /*
47: * The time for a process to be blocked before being very swappable.
48: * This is a number of seconds which the system takes as being a non-trivial
49: * amount of real time. You probably shouldn't change this;
50: * it is used in subtle ways (fractions and multiples of it are, that is, like
51: * half of a ``long time'', almost a long time, etc.)
52: * It is related to human patience and other factors which don't really
53: * change over time.
54: */
55: #define MAXSLP 20
56:
57: /*
58: * A swapped in process is given a small amount of core without being bothered
59: * by the page replacement algorithm. Basically this says that if you are
60: * swapped in you deserve some resources. We protect the last SAFERSS
61: * pages against paging and will just swap you out rather than paging you.
62: * Note that each process has at least UPAGES+CLSIZE pages which are not
63: * paged anyways (this is currently 1+1=2 pages or 16k bytes), so this
64: * number just means a swapped in process is given around 40k bytes.
65: */
66: #define SAFERSS 3 /* nominal ``small'' resident set size
67: protected against replacement */
68:
69: /*
70: * DISKRPM is used to estimate the number of paging i/o operations
71: * which one can expect from a single disk controller.
72: */
73: #define DISKRPM 60
74:
75: /*
76: * Klustering constants. Klustering is the gathering
77: * of pages together for pagein/pageout, while clustering
78: * is the treatment of hardware page size as though it were
79: * larger than it really is.
80: *
81: * KLMAX gives maximum cluster size in CLSIZE page (cluster-page)
82: * units. Note that KLMAX*CLSIZE must be a divisor of DMMIN in
83: * autoconf.c and <= MAXPHYS/CLBYTES in vm_swp.c.
84: */
85:
86: #define KLMAX (2/CLSIZE)
87: #define KLSEQL (2/CLSIZE) /* in klust if vadvise(VA_SEQL) */
88: #define KLIN (1/CLSIZE) /* default data/stack in klust */
89: #define KLTXT (1/CLSIZE) /* default text in klust */
90: #define KLOUT (2/CLSIZE)
91:
92: /*
93: * KLSDIST is the advance or retard of the fifo reclaim for sequential
94: * processes data space.
95: */
96: #define KLSDIST 2 /* klusters advance/retard for seq. fifo */
97:
98: /*
99: * Paging thresholds (see vm_sched.c).
100: * Strategy of 3/17/83:
101: * lotsfree is 1/8 of memory free.
102: * desfree is 100k bytes, but at most 1/16 of memory
103: * minfree is 32k bytes, but at most 1/2 of desfree
104: */
105: #define LOTSFREEFRACT 8
106: #define DESFREE (100 * 1024)
107: #define DESFREEFRACT 16
108: #define MINFREE (32 * 1024)
109: #define MINFREEFRACT 2
110:
111: /*
112: * Paged text files that are less than PGTHRESH bytes may be swapped
113: * in instead of paged in.
114: */
115: #define PGTHRESH (200 * 1024)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.