mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-09 18:10:32 +00:00
Don't go below the low water mark of free pages due to optional prefaulting
of pages. PR: 2431
This commit is contained in:
parent
34d2198035
commit
3bfe64f96a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38893
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue