summaryrefslogtreecommitdiff
path: root/sys/alpha
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2005-11-19 20:31:31 +0000
committerAlan Cox <alc@FreeBSD.org>2005-11-19 20:31:31 +0000
commit1d0aa3e2d3cd5995d1b2e9659888b78259d6c83c (patch)
treea0e98c8fed0ed7e3c7732194add206d45e54fc15 /sys/alpha
parent359182019b668af23fd121688df8f7f369102430 (diff)
Notes
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/pmap.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c
index c1d9ffa24ef3..30f18fdb40cf 100644
--- a/sys/alpha/alpha/pmap.c
+++ b/sys/alpha/alpha/pmap.c
@@ -186,8 +186,6 @@ __FBSDID("$FreeBSD$");
#define PMAP_DIAGNOSTIC
#endif
-#define MINPV 2048
-
#if 0
#define PMAP_DIAGNOSTIC
#define PMAP_DEBUG
@@ -571,28 +569,24 @@ pmap_page_init(vm_page_t m)
void
pmap_init(void)
{
+ int shpgperproc = PMAP_SHPGPERPROC;
/*
- * init the pv free list
+ * Initialize the address space (zone) for the pv entries. Set a
+ * high water mark so that the system can recover from excessive
+ * numbers of pv entries.
*/
- pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry), NULL, NULL,
+ pvzone = uma_zcreate("PV ENTRY", sizeof(struct pv_entry), NULL, NULL,
NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE);
- uma_prealloc(pvzone, MINPV);
+ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc);
+ pv_entry_max = shpgperproc * maxproc + cnt.v_page_count;
+ TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max);
+ pv_entry_high_water = 9 * (pv_entry_max / 10);
}
-/*
- * Initialize the address space (zone) for the pv_entries. Set a
- * high water mark so that the system can recover from excessive
- * numbers of pv entries.
- */
void
pmap_init2()
{
- int shpgperproc = PMAP_SHPGPERPROC;
-
- TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc);
- pv_entry_max = shpgperproc * maxproc + vm_page_array_size;
- pv_entry_high_water = 9 * (pv_entry_max / 10);
}
@@ -1312,8 +1306,7 @@ static pv_entry_t
get_pv_entry(void)
{
pv_entry_count++;
- if (pv_entry_high_water &&
- (pv_entry_count > pv_entry_high_water) &&
+ if ((pv_entry_count > pv_entry_high_water) &&
(pmap_pagedaemon_waken == 0)) {
pmap_pagedaemon_waken = 1;
wakeup (&vm_pages_needed);