defparam PAGER_MAP_SIZE.
This commit is contained in:
parent
ac301375d9
commit
23005df1e0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.7 2006/10/05 00:25:50 bjh21 Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.8 2007/10/25 13:03:03 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -68,7 +68,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (1 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (1 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Mach derived constants
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.20 2005/12/11 12:16:05 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.21 2007/10/25 13:03:03 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.226 2007/10/17 19:52:56 garbled Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.227 2007/10/25 13:03:03 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -145,7 +145,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.226 2007/10/17 19:52:56 garbled Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.227 2007/10/25 13:03:03 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -831,7 +831,7 @@ pmap_bootstrap(paddr_t ptaddr, u_int maxasn, u_long ncpuids)
|
||||
|
||||
lev3mapsize =
|
||||
(VM_PHYS_SIZE + (ubc_nwins << ubc_winshift) +
|
||||
bufsz + 16 * NCARGS + PAGER_MAP_SIZE) / PAGE_SIZE +
|
||||
bufsz + 16 * NCARGS + pager_map_size) / PAGE_SIZE +
|
||||
(maxproc * UPAGES) + nkmempages;
|
||||
|
||||
#ifdef SYSVSHM
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.25 2005/12/11 12:17:04 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.26 2007/10/25 13:03:03 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.23 2005/12/11 12:17:09 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.24 2007/10/25 13:03:03 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.27 2005/12/11 12:17:33 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.28 2007/10/25 13:03:04 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.10 2007/10/17 19:54:59 garbled Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.11 2007/10/25 13:03:04 yamt Exp $ */
|
||||
|
||||
|
||||
/*-
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.10 2007/10/17 19:54:59 garbled Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.11 2007/10/25 13:03:04 yamt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -628,7 +628,7 @@ pmap_bootstrap()
|
||||
buf_setvalimit(bufsz);
|
||||
|
||||
nkpt = (((ubc_nwins << ubc_winshift) +
|
||||
bufsz + 16 * NCARGS + PAGER_MAP_SIZE) / PAGE_SIZE +
|
||||
bufsz + 16 * NCARGS + pager_map_size) / PAGE_SIZE +
|
||||
USRIOSIZE + (maxproc * UPAGES) + nkmempages) / NKPTEPG;
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.2 2005/12/11 12:17:51 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.3 2007/10/25 13:03:04 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.176 2007/10/17 19:55:39 garbled Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.177 2007/10/25 13:03:04 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
|
||||
@ -74,7 +74,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.176 2007/10/17 19:55:39 garbled Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.177 2007/10/25 13:03:04 yamt Exp $");
|
||||
|
||||
/*
|
||||
* Manages physical address maps.
|
||||
@ -311,7 +311,7 @@ pmap_bootstrap(void)
|
||||
buf_setvalimit(bufsz);
|
||||
|
||||
Sysmapsize = (VM_PHYS_SIZE + (ubc_nwins << ubc_winshift) +
|
||||
bufsz + 16 * NCARGS + PAGER_MAP_SIZE) / NBPG +
|
||||
bufsz + 16 * NCARGS + pager_map_size) / NBPG +
|
||||
(maxproc * UPAGES) + nkmempages;
|
||||
|
||||
#ifdef SYSVSHM
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.27 2005/12/11 12:18:17 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.28 2007/10/25 13:03:04 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -91,16 +91,6 @@
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#define PAGE_MASK (PAGE_SIZE - 1)
|
||||
|
||||
/*
|
||||
* Need a small pager map for the benefit of low-memory models.
|
||||
* To avoid using a needlessly small value on larger memory models,
|
||||
* this is calculated at runtime.
|
||||
*/
|
||||
#ifndef PAGER_MAP_SIZE
|
||||
extern int mvme68k_pager_map_size;
|
||||
#define PAGER_MAP_SIZE ((vsize_t) mvme68k_pager_map_size)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* USRSTACK is the top (end) of the user stack.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.123 2007/10/17 19:55:48 garbled Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.124 2007/10/25 13:03:04 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.123 2007/10/17 19:55:48 garbled Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.124 2007/10/25 13:03:04 yamt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_hpux.h"
|
||||
@ -227,13 +227,6 @@ int mem_cluster_cnt;
|
||||
int cpuspeed; /* only used for printing later */
|
||||
int delay_divisor = 512; /* assume some reasonable value to start */
|
||||
|
||||
/*
|
||||
* Since mvme68k boards can have anything from 4MB of onboard RAM, we
|
||||
* would rather set the PAGER_MAP_SIZE at runtime based on the amount
|
||||
* of onboard RAM.
|
||||
*/
|
||||
int mvme68k_pager_map_size;
|
||||
|
||||
/* Machine-dependent initialization routines. */
|
||||
void mvme68k_init __P((void));
|
||||
|
||||
@ -256,13 +249,17 @@ mvme68k_init()
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Set PAGER_MAP_SIZE to half the size of onboard RAM, up to a
|
||||
* Since mvme68k boards can have anything from 4MB of onboard RAM, we
|
||||
* would rather set the pager_map_size at runtime based on the amount
|
||||
* of onboard RAM.
|
||||
*
|
||||
* Set pager_map_size to half the size of onboard RAM, up to a
|
||||
* maximum of 16MB.
|
||||
* (Note: Just use ps_end here since onboard RAM starts at 0x0)
|
||||
*/
|
||||
mvme68k_pager_map_size = phys_seg_list[0].ps_end / 2;
|
||||
if (mvme68k_pager_map_size > (16 * 1024 * 1024))
|
||||
mvme68k_pager_map_size = 16 * 1024 * 1024;
|
||||
pager_map_size = phys_seg_list[0].ps_end / 2;
|
||||
if (pager_map_size > (16 * 1024 * 1024))
|
||||
pager_map_size = 16 * 1024 * 1024;
|
||||
|
||||
/*
|
||||
* Tell the VM system about available physical memory.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.23 2005/12/11 12:18:20 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.24 2007/10/25 13:03:05 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.4 2003/04/02 07:36:03 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.5 2007/10/25 13:03:05 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -104,7 +104,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
#define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.15 2005/12/11 12:19:02 christos Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.16 2007/10/25 13:03:05 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.10 2003/04/02 07:53:57 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.11 2007/10/25 13:03:05 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -55,8 +55,7 @@
|
||||
/*
|
||||
* We definitely need a small pager map.
|
||||
*/
|
||||
#undef PAGER_MAP_SIZE
|
||||
#define PAGER_MAP_SIZE (1 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (1 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* USRSTACK is the top (end) of the user stack.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam3.h,v 1.33 2005/12/11 12:19:21 christos Exp $ */
|
||||
/* $NetBSD: vmparam3.h,v 1.34 2007/10/25 13:03:05 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -135,4 +135,4 @@
|
||||
#define SHMMAXPGS 512 /* 4 MB */
|
||||
#endif
|
||||
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.151 2007/10/17 19:57:59 garbled Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.152 2007/10/25 13:03:05 yamt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994, 1998, 1999, 2003 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.151 2007/10/17 19:57:59 garbled Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.152 2007/10/25 13:03:05 yamt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_cputype.h"
|
||||
@ -217,7 +217,7 @@ calc_kvmsize(vsize_t usrptsize)
|
||||
/* IO device register space */
|
||||
kvmsize += (IOSPSZ * VAX_NBPG);
|
||||
/* Pager allocations */
|
||||
kvmsize += (PAGER_MAP_SIZE + MAXBSIZE);
|
||||
kvmsize += (pager_map_size + MAXBSIZE);
|
||||
/* Anon pool structures */
|
||||
kvmsize += (physmem * sizeof(struct vm_anon));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vmparam.h,v 1.1 2006/12/16 05:48:52 ober Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.2 2007/10/25 13:03:05 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
@ -49,7 +49,7 @@
|
||||
/*
|
||||
* Override the default pager_map size, there's not enough KVA.
|
||||
*/
|
||||
#define PAGER_MAP_SIZE (4 * 1024 * 1024)
|
||||
#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024)
|
||||
|
||||
/*
|
||||
* Size of User Raw I/O map
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files.uvm,v 1.9 2007/07/17 17:42:08 joerg Exp $
|
||||
# $NetBSD: files.uvm,v 1.10 2007/10/25 13:03:06 yamt Exp $
|
||||
|
||||
#
|
||||
# UVM options
|
||||
@ -8,6 +8,7 @@ defflag opt_uvm.h USE_TOPDOWN_VM UVMMAP_NOCOUNTERS
|
||||
defflag opt_vmswap.h VMSWAP
|
||||
defflag opt_readahead.h READAHEAD_STATS
|
||||
defflag opt_ubc.h UBC_STATS
|
||||
defparam opt_pagermap.h PAGER_MAP_SIZE
|
||||
defflag PDPOLICY_CLOCKPRO
|
||||
|
||||
file uvm/uvm_amap.c
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_pager.c,v 1.86 2007/09/01 23:40:25 pooka Exp $ */
|
||||
/* $NetBSD: uvm_pager.c,v 1.87 2007/10/25 13:03:06 yamt Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -39,10 +39,11 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.86 2007/09/01 23:40:25 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.87 2007/10/25 13:03:06 yamt Exp $");
|
||||
|
||||
#include "opt_uvmhist.h"
|
||||
#include "opt_readahead.h"
|
||||
#include "opt_pagermap.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -53,6 +54,22 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.86 2007/09/01 23:40:25 pooka Exp $")
|
||||
|
||||
#include <uvm/uvm.h>
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* this is needed until the device strategy interface
|
||||
* is changed to do physically-addressed i/o.
|
||||
*/
|
||||
|
||||
#ifndef PAGER_MAP_DEFAULT_SIZE
|
||||
#define PAGER_MAP_DEFAULT_SIZE (16 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
#ifndef PAGER_MAP_SIZE
|
||||
#define PAGER_MAP_SIZE PAGER_MAP_DEFAULT_SIZE
|
||||
#endif
|
||||
|
||||
size_t pager_map_size = PAGER_MAP_SIZE;
|
||||
|
||||
struct pool *uvm_aiobuf_pool;
|
||||
|
||||
/*
|
||||
@ -91,7 +108,7 @@ uvm_pager_init(void)
|
||||
*/
|
||||
|
||||
sva = 0;
|
||||
pager_map = uvm_km_suballoc(kernel_map, &sva, &eva, PAGER_MAP_SIZE, 0,
|
||||
pager_map = uvm_km_suballoc(kernel_map, &sva, &eva, pager_map_size, 0,
|
||||
false, NULL);
|
||||
mutex_init(&pager_map_wanted_lock, MUTEX_DEFAULT, IPL_NONE);
|
||||
pager_map_wanted = false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_pager.h,v 1.36 2007/04/23 20:10:50 pooka Exp $ */
|
||||
/* $NetBSD: uvm_pager.h,v 1.37 2007/10/25 13:03:06 yamt Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -178,21 +178,13 @@ struct vm_page *uvm_pageratop(vaddr_t);
|
||||
vaddr_t uvm_pagermapin(struct vm_page **, int, int);
|
||||
void uvm_pagermapout(vaddr_t, int);
|
||||
|
||||
extern size_t pager_map_size;
|
||||
|
||||
/* Flags to uvm_pagermapin() */
|
||||
#define UVMPAGER_MAPIN_WAITOK 0x01 /* it's okay to wait */
|
||||
#define UVMPAGER_MAPIN_READ 0x02 /* device -> host */
|
||||
#define UVMPAGER_MAPIN_WRITE 0x00 /* host -> device (pseudo flag) */
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* this is needed until the device strategy interface
|
||||
* is changed to do physically-addressed i/o.
|
||||
*/
|
||||
|
||||
#ifndef PAGER_MAP_SIZE
|
||||
#define PAGER_MAP_SIZE (16 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _UVM_UVM_PAGER_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user