summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/pmap.c11
-rw-r--r--sys/i386/i386/pmap.c11
2 files changed, 20 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 76f5bcf..2be04c8 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.207 1998/08/23 10:16:25 bde Exp $
+ * $Id: pmap.c,v 1.208 1998/09/04 13:10:34 ache Exp $
*/
/*
@@ -2717,6 +2717,15 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
panic("pmap_copy: invalid to pmap_copy page tables\n");
#endif
+ /*
+ * Don't let optional prefaulting of pages make us go
+ * way below the low water mark of free pages or way
+ * above high water mark of used pv entries.
+ */
+ if (cnt.v_free_count < cnt.v_free_reserved ||
+ pv_entry_count > pv_entry_high_water)
+ break;
+
pdnxt = ((addr + PAGE_SIZE*NPTEPG) & ~(PAGE_SIZE*NPTEPG - 1));
ptepindex = addr >> PDRSHIFT;
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 76f5bcf..2be04c8 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.207 1998/08/23 10:16:25 bde Exp $
+ * $Id: pmap.c,v 1.208 1998/09/04 13:10:34 ache Exp $
*/
/*
@@ -2717,6 +2717,15 @@ pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
panic("pmap_copy: invalid to pmap_copy page tables\n");
#endif
+ /*
+ * Don't let optional prefaulting of pages make us go
+ * way below the low water mark of free pages or way
+ * above high water mark of used pv entries.
+ */
+ if (cnt.v_free_count < cnt.v_free_reserved ||
+ pv_entry_count > pv_entry_high_water)
+ break;
+
pdnxt = ((addr + PAGE_SIZE*NPTEPG) & ~(PAGE_SIZE*NPTEPG - 1));
ptepindex = addr >> PDRSHIFT;
OpenPOWER on IntegriCloud