|
|
1.1 root 1: /* vmparam.h 6.1 83/07/29 */
2:
3: /*
4: * Machine dependent constants for TAHOE
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 P2 region to the
11: * beginning of the stack respectively.
12: */
13: /* number of ptes per page */
14: #define USRTEXT 0
15: #define USRSTACK (0xC0000000-UPAGES*NBPG)
16: /* Start of user stack */
17: #define P2PAGES 0x100000 /* number of pages in P2 region */
18: #define LOWPAGES 0
19: #define HIGHPAGES UPAGES
20:
21: /*
22: * Virtual memory related constants
23: */
24: #define SLOP 32
25: #define MAXTSIZ (24*1024-SLOP) /* max text size (clicks) */
26: #define MAXDSIZ (24*1024-32-SLOP) /* max data size (clicks) */
27: #define MAXSSIZ (24*1024-32-SLOP) /* max stack size (clicks) */
28:
29: /*
30: * Sizes of the system and user portions of the system page table.
31: * Feeling is that the base system requires around 8000 entries to function
32: * Plus we allocate a quarter of a page per process
33: *
34: */
35: /* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */
36: /* The first expression is for system space */
37: /* 12 are for the kernel space itself. */
38: /* 8 are for disk buffer space */
39: /* 4 are for tape buffer space */
40: /* 31 are unaccounted for */
41: /* -- */
42: /* 55 base kernel page table */
43: /* */
44: /*latest thought (test+data)/10k) * 2 */
45: /* 22k + 12k = 34 * 2 = 68 */
46: /*Complete madness plan, for kernel */
47: /* 128 */
48: #define SYSPTSIZE ((128*NPTEPG/2)+(MAXUSERS*NPTEPG/16))
49: #define USRPTSIZE (4*NPTEPG)
50:
51: /*
52: * The size of the clock loop.
53: */
54: #define LOOPPAGES (maxfree - firstfree)
55:
56: /*
57: * The time for a process to be blocked before being very swappable.
58: * This is a number of seconds which the system takes as being a non-trivial
59: * amount of real time. You probably shouldn't change this;
60: * it is used in subtle ways (fractions and multiples of it are, that is, like
61: * half of a ``long time'', almost a long time, etc.)
62: * It is related to human patience and other factors which don't really
63: * change over time.
64: */
65: #define MAXSLP 20
66:
67: /*
68: * A swapped in process is given a small amount of core without being bothered
69: * by the page replacement algorithm. Basically this says that if you are
70: * swapped in you deserve some resources. We protect the last SAFERSS
71: * pages against paging and will just swap you out rather than paging you.
72: * Note that each process has at least UPAGES+CLSIZE pages which are not
73: * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
74: * number just means a swapped in process is given around 25k bytes.
75: * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
76: * so we loan each swapped in process memory worth 100$, or just admit
77: * that we don't consider it worthwhile and swap it out to disk which costs
78: * $30/mb or about $0.75.
79: */
80: #define SAFERSS 16 /* nominal ``small'' resident set size
81: protected against replacement */
82:
83: /*
84: * DISKRPM is used to estimate the number of paging i/o operations
85: * which one can expect from a single disk controller.
86: */
87: #define DISKRPM 60
88:
89: /*
90: * Klustering constants. Klustering is the gathering
91: * of pages together for pagein/pageout, while clustering
92: * is the treatment of hardware page size as though it were
93: * larger than it really is.
94: *
95: * KLMAX gives maximum cluster size in CLSIZE page (cluster-page)
96: * units. Note that KLMAX*CLSIZE must be <= DMMIN in dmap.h.
97: */
98:
99: #define KLMAX (32/CLSIZE)
100: #define KLSEQL (16/CLSIZE) /* in klust if vadvise(VA_SEQL) */
101: #define KLIN (8/CLSIZE) /* default data/stack in klust */
102: #define KLTXT (4/CLSIZE) /* default text in klust */
103: #define KLOUT (32/CLSIZE)
104:
105: /*
106: * KLSDIST is the advance or retard of the fifo reclaim for sequential
107: * processes data space.
108: */
109: #define KLSDIST 3 /* klusters advance/retard for seq. fifo */
110:
111: /*
112: * Paging thresholds (see vm_sched.c).
113: * Strategy of 4/22/81:
114: * lotsfree is 1/4 of memory free.
115: * desfree is 200k bytes, but at most 1/8 of memory
116: * minfree is 64k bytes, but at most 1/2 of desfree
117: */
118: #define LOTSFREEFRACT 4
119: #define DESFREE (200 * 1024)
120: #define DESFREEFRACT 8
121: #define MINFREE (64 * 1024)
122: #define MINFREEFRACT 2
123:
124: /*
125: * Believed threshold (in megabytes) for which interleaved
126: * swapping area is desirable.
127: */
128: #define LOTSOFMEM 2
129:
130: /*
131: * BEWARE THIS DEFINITION WORKS ONLY WITH COUNT OF 1
132: */
133: #define mapin(pte, v, pfnum, count, prot) \
134: (*(int *)(pte) = (pfnum) | (prot), mtpr(ptob(v), TBIS))
135:
136: /*
137: * The following constant is used to initialize the map of the
138: * system page table i/o entries.
139: * It's value should be the highest i/o address used by all the
140: * controllers handled in the system as specified in ubminit
141: * structure in ioconf.c.
142: */
143: #define MAXIOADDR 0xffffee45 /* highest physical io address */
144:
145: /* Number of entries in the system page pable for i/o space */
146: #define IOSIZE (( (MAXIOADDR - IOBASE+ NBPG -1) >> PGSHIFT )+1)
147: #define TBUFSIZ 32 /* maximum tape buffer size */
148: #define ACEBPTE 32 /* ACC Ethernet (ACE) I/O window */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.