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