xref: /csrg-svn/sys/vax/include/vmparam.h (revision 9173)
1*9173Ssam /*	vmparam.h	4.2	82/11/13	*/
29119Ssam 
39119Ssam /*
49119Ssam  * Machine dependent constants for VAX
59119Ssam  */
69119Ssam /*
79119Ssam  * USRTEXT is the start of the user text/data space, while USRSTACK
89119Ssam  * is the top (end) of the user stack.  LOWPAGES and HIGHPAGES are
99119Ssam  * the number of pages from the beginning of the P0 region to the
109119Ssam  * beginning of the text and from the beginning of the P1 region to the
119119Ssam  * beginning of the stack respectively.
129119Ssam  */
139119Ssam 					/* number of ptes per page */
149119Ssam #define	USRTEXT		0
159119Ssam #define	USRSTACK	(0x80000000-UPAGES*NBPG)
169119Ssam 					/* Start of user stack */
179119Ssam #define	P1PAGES		0x200000	/* number of pages in P1 region */
189119Ssam #define	LOWPAGES	0
199119Ssam #define	HIGHPAGES	UPAGES
209119Ssam 
219119Ssam /*
229119Ssam  * Virtual memory related constants
239119Ssam  */
249119Ssam #define	SLOP	32
259119Ssam #define	MAXTSIZ		(6*2048-SLOP)		/* max text size (clicks) */
269119Ssam #ifndef MAXDSIZ
279119Ssam #define	MAXDSIZ		(12*1024-32-SLOP)	/* max data size (clicks) */
289119Ssam #endif
299119Ssam #define	MAXSSIZ		(12*1024-32-SLOP)	/* max stack size (clicks) */
309119Ssam 
319119Ssam /*
329119Ssam  * Sizes of the system and user portions of the system page table.
339119Ssam  */
349119Ssam /* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */
35*9173Ssam #define	SYSPTSIZE	(35*NPTEPG)
369119Ssam #define	USRPTSIZE 	(8*NPTEPG)
379119Ssam 
389119Ssam /*
399119Ssam  * The size of the clock loop.
409119Ssam  */
419119Ssam #define	LOOPPAGES	(maxfree - firstfree)
429119Ssam 
439119Ssam /*
449119Ssam  * The time for a process to be blocked before being very swappable.
459119Ssam  * This is a number of seconds which the system takes as being a non-trivial
469119Ssam  * amount of real time.  You probably shouldn't change this;
479119Ssam  * it is used in subtle ways (fractions and multiples of it are, that is, like
489119Ssam  * half of a ``long time'', almost a long time, etc.)
499119Ssam  * It is related to human patience and other factors which don't really
509119Ssam  * change over time.
519119Ssam  */
529119Ssam #define	MAXSLP 		20
539119Ssam 
549119Ssam /*
559119Ssam  * A swapped in process is given a small amount of core without being bothered
569119Ssam  * by the page replacement algorithm.  Basically this says that if you are
579119Ssam  * swapped in you deserve some resources.  We protect the last SAFERSS
589119Ssam  * pages against paging and will just swap you out rather than paging you.
599119Ssam  * Note that each process has at least UPAGES+CLSIZE pages which are not
609119Ssam  * paged anyways (this is currently 8+2=10 pages or 5k bytes), so this
619119Ssam  * number just means a swapped in process is given around 25k bytes.
629119Ssam  * Just for fun: current memory prices are 4600$ a megabyte on VAX (4/22/81),
639119Ssam  * so we loan each swapped in process memory worth 100$, or just admit
649119Ssam  * that we don't consider it worthwhile and swap it out to disk which costs
659119Ssam  * $30/mb or about $0.75.
669119Ssam  */
679119Ssam #define	SAFERSS		32		/* nominal ``small'' resident set size
689119Ssam 					   protected against replacement */
699119Ssam 
709119Ssam /*
719119Ssam  * DISKRPM is used to estimate the number of paging i/o operations
729119Ssam  * which one can expect from a single disk controller.
739119Ssam  */
749119Ssam #define	DISKRPM		60
759119Ssam 
769119Ssam /*
779119Ssam  * Klustering constants.  Klustering is the gathering
789119Ssam  * of pages together for pagein/pageout, while clustering
799119Ssam  * is the treatment of hardware page size as though it were
809119Ssam  * larger than it really is.
819119Ssam  *
829119Ssam  * KLMAX gives maximum cluster size in CLSIZE page (cluster-page)
839119Ssam  * units.  Note that KLMAX*CLSIZE must be <= DMMIN in dmap.h.
849119Ssam  */
859119Ssam 
869119Ssam #define	KLMAX	(32/CLSIZE)
879119Ssam #define	KLSEQL	(16/CLSIZE)		/* in klust if vadvise(VA_SEQL) */
889119Ssam #define	KLIN	(8/CLSIZE)		/* default data/stack in klust */
899119Ssam #define	KLTXT	(4/CLSIZE)		/* default text in klust */
909119Ssam #define	KLOUT	(32/CLSIZE)
919119Ssam 
929119Ssam /*
939119Ssam  * KLSDIST is the advance or retard of the fifo reclaim for sequential
949119Ssam  * processes data space.
959119Ssam  */
969119Ssam #define	KLSDIST	3		/* klusters advance/retard for seq. fifo */
97