summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-07-17 23:21:59 +0000
committerpeter <peter@FreeBSD.org>2002-07-17 23:21:59 +0000
commit92efaa3886f4506307513353c2f419fbcb39ebaa (patch)
treea19e00b18b968cf99fa9a7765591bf0509e39505 /sys
parent64091556dc53dde17eb869c0c1d863a19555426e (diff)
downloadFreeBSD-src-92efaa3886f4506307513353c2f419fbcb39ebaa.zip
FreeBSD-src-92efaa3886f4506307513353c2f419fbcb39ebaa.tar.gz
Cap the initial PV and PTE table preallocations. Otherwise we explode
on the Itanium2 system I have when we use up *all* of the initial 256MB direct mapped region before we are ready to dynamically expand it. The machine that I have has 4 cpus and a very big hole in the middle. This makes the bogus '(last_address - first_address) / PAGE_SIZE' calculations especially dangerous and caused many millions of initial PV/PTE's to be preallocated.
Diffstat (limited to 'sys')
-rw-r--r--sys/ia64/ia64/pmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c
index de22d36..7378475 100644
--- a/sys/ia64/ia64/pmap.c
+++ b/sys/ia64/ia64/pmap.c
@@ -133,7 +133,8 @@ MALLOC_DEFINE(M_PMAP, "PMAP", "PMAP Structures");
#define PMAP_DIAGNOSTIC
#endif
-#define MINPV 2048
+#define MINPV 2048 /* Preallocate at least this many */
+#define MAXPV 20480 /* But no more than this */
#if 0
#define PMAP_DIAGNOSTIC
@@ -521,6 +522,8 @@ pmap_init(vm_offset_t phys_start, vm_offset_t phys_end)
initial_pvs = vm_page_array_size;
if (initial_pvs < MINPV)
initial_pvs = MINPV;
+ if (initial_pvs > MAXPV)
+ initial_pvs = MAXPV;
pvzone = uma_zcreate("PV ENTRY", sizeof (struct pv_entry),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM);
uma_zone_set_allocf(pvzone, pmap_allocf);
OpenPOWER on IntegriCloud