vmparam.h revision 92670
166458Sdfr/* $FreeBSD: head/sys/ia64/include/vmparam.h 92670 2002-03-19 11:07:09Z peter $ */
266458Sdfr/* From: NetBSD: vmparam.h,v 1.6 1997/09/23 23:23:23 mjacob Exp */
366458Sdfr#ifndef	_ALPHA_VMPARAM_H
466458Sdfr#define	_ALPHA_VMPARAM_H
566458Sdfr/*
666458Sdfr * Copyright (c) 1988 University of Utah.
766458Sdfr * Copyright (c) 1992, 1993
866458Sdfr *	The Regents of the University of California.  All rights reserved.
966458Sdfr *
1066458Sdfr * This code is derived from software contributed to Berkeley by
1166458Sdfr * the Systems Programming Group of the University of Utah Computer
1266458Sdfr * Science Department and Ralph Campbell.
1366458Sdfr *
1466458Sdfr * Redistribution and use in source and binary forms, with or without
1566458Sdfr * modification, are permitted provided that the following conditions
1666458Sdfr * are met:
1766458Sdfr * 1. Redistributions of source code must retain the above copyright
1866458Sdfr *    notice, this list of conditions and the following disclaimer.
1966458Sdfr * 2. Redistributions in binary form must reproduce the above copyright
2066458Sdfr *    notice, this list of conditions and the following disclaimer in the
2166458Sdfr *    documentation and/or other materials provided with the distribution.
2266458Sdfr * 3. All advertising materials mentioning features or use of this software
2366458Sdfr *    must display the following acknowledgement:
2466458Sdfr *	This product includes software developed by the University of
2566458Sdfr *	California, Berkeley and its contributors.
2666458Sdfr * 4. Neither the name of the University nor the names of its contributors
2766458Sdfr *    may be used to endorse or promote products derived from this software
2866458Sdfr *    without specific prior written permission.
2966458Sdfr *
3066458Sdfr * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3166458Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3266458Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3366458Sdfr * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3466458Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3566458Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3666458Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3766458Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3866458Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3966458Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4066458Sdfr * SUCH DAMAGE.
4166458Sdfr *
4266458Sdfr * from: Utah $Hdr: vmparam.h 1.16 91/01/18$
4366458Sdfr *
4466458Sdfr *	@(#)vmparam.h	8.2 (Berkeley) 4/22/94
4566458Sdfr */
4666458Sdfr
4766458Sdfr/*
4866458Sdfr * Machine dependent constants for Alpha.
4966458Sdfr */
5066458Sdfr/*
5166458Sdfr * USRTEXT is the start of the user text/data space, while USRSTACK
5266458Sdfr * is the top (end) of the user stack.  Immediately above the user stack
5366458Sdfr * resides the user structure, which is UPAGES long and contains the
5466458Sdfr * kernel stack.
5566458Sdfr */
5666458Sdfr#define	USRTEXT		CLBYTES
5766633Sdfr#define	USRSTACK	VM_MAXUSER_ADDRESS
5866458Sdfr
5966458Sdfr/*
6066458Sdfr * Virtual memory related constants, all in bytes
6166458Sdfr */
6266458Sdfr#ifndef MAXTSIZ
6366458Sdfr#define	MAXTSIZ		(1<<30)			/* max text size (1G) */
6466458Sdfr#endif
6566458Sdfr#ifndef DFLDSIZ
6666458Sdfr#define	DFLDSIZ		(1<<27)			/* initial data size (128M) */
6766458Sdfr#endif
6866458Sdfr#ifndef MAXDSIZ
6966458Sdfr#define	MAXDSIZ		(1<<30)			/* max data size (1G) */
7066458Sdfr#endif
7166458Sdfr#ifndef	DFLSSIZ
7266458Sdfr#define	DFLSSIZ		(1<<21)			/* initial stack size (2M) */
7366458Sdfr#endif
7466458Sdfr#ifndef	MAXSSIZ
7592670Speter#define	MAXSSIZ		(1<<28)			/* max stack size (256M) */
7666458Sdfr#endif
7766458Sdfr#ifndef SGROWSIZ
7866458Sdfr#define SGROWSIZ	(128UL*1024)		/* amount to grow stack */
7966458Sdfr#endif
8066458Sdfr
8166458Sdfr/*
8266458Sdfr * PTEs for mapping user space into the kernel for phyio operations.
8366458Sdfr * 64 pte's are enough to cover 8 disks * MAXBSIZE.
8466458Sdfr */
8566458Sdfr#ifndef USRIOSIZE
8666458Sdfr#define USRIOSIZE	64
8766458Sdfr#endif
8866458Sdfr
8966458Sdfr/*
9066458Sdfr * Boundary at which to place first MAPMEM segment if not explicitly
9166458Sdfr * specified.  Should be a power of two.  This allows some slop for
9266458Sdfr * the data segment to grow underneath the first mapped segment.
9366458Sdfr */
9466458Sdfr#define MMSEG		0x200000
9566458Sdfr
9666458Sdfr/*
9766458Sdfr * The size of the clock loop.
9866458Sdfr */
9966458Sdfr#define	LOOPPAGES	(maxfree - firstfree)
10066458Sdfr
10166458Sdfr/*
10266458Sdfr * The time for a process to be blocked before being very swappable.
10366458Sdfr * This is a number of seconds which the system takes as being a non-trivial
10466458Sdfr * amount of real time.  You probably shouldn't change this;
10566458Sdfr * it is used in subtle ways (fractions and multiples of it are, that is, like
10666458Sdfr * half of a ``long time'', almost a long time, etc.)
10766458Sdfr * It is related to human patience and other factors which don't really
10866458Sdfr * change over time.
10966458Sdfr */
11066458Sdfr#define	MAXSLP 		20
11166458Sdfr
11266458Sdfr/*
11366458Sdfr * A swapped in process is given a small amount of core without being bothered
11466458Sdfr * by the page replacement algorithm.  Basically this says that if you are
11566458Sdfr * swapped in you deserve some resources.  We protect the last SAFERSS
11666458Sdfr * pages against paging and will just swap you out rather than paging you.
11766458Sdfr * Note that each process has at least UPAGES+CLSIZE pages which are not
11866458Sdfr * paged anyways, in addition to SAFERSS.
11966458Sdfr */
12066458Sdfr#define	SAFERSS		10		/* nominal ``small'' resident set size
12166458Sdfr					   protected against replacement */
12266458Sdfr
12366458Sdfr/*
12466458Sdfr * Mach derived constants
12566458Sdfr */
12666458Sdfr
12766458Sdfr/* user/kernel map constants */
12866458Sdfr#define VM_MIN_ADDRESS		0
12966458Sdfr#define VM_MAXUSER_ADDRESS	IA64_RR_BASE(5)
13066458Sdfr#define VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
13166458Sdfr#define VM_MIN_KERNEL_ADDRESS	IA64_RR_BASE(5)
13266458Sdfr#define VM_MAX_KERNEL_ADDRESS	(IA64_RR_BASE(6) - 1)
13366458Sdfr
13466458Sdfr/* virtual sizes (bytes) for various kernel submaps */
13566458Sdfr#ifndef VM_KMEM_SIZE
13666458Sdfr#define VM_KMEM_SIZE		(12 * 1024 * 1024)
13766458Sdfr#endif
13866458Sdfr
13966458Sdfr/*
14066458Sdfr * How many physical pages per KVA page allocated.
14166458Sdfr * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX)
14266458Sdfr * is the total KVA space allocated for kmem_map.
14366458Sdfr */
14466458Sdfr#ifndef VM_KMEM_SIZE_SCALE
14566458Sdfr#define	VM_KMEM_SIZE_SCALE	(4) /* XXX 8192 byte pages */
14666458Sdfr#endif
14766458Sdfr
14866458Sdfr/* initial pagein size of beginning of executable file */
14966458Sdfr#ifndef VM_INITIAL_PAGEIN
15066458Sdfr#define	VM_INITIAL_PAGEIN	16
15166458Sdfr#endif
15266458Sdfr
15366458Sdfr#endif	/* !_ALPHA_VMPARAM_H */
154