diff options
author | Tor Egge <tegge@FreeBSD.org> | 2001-10-14 20:51:14 +0000 |
---|---|---|
committer | Tor Egge <tegge@FreeBSD.org> | 2001-10-14 20:51:14 +0000 |
commit | 30105b9ec4978454486149499b3dbe4545df0ca6 (patch) | |
tree | 5cb2ff9b355db4d0261ace7b4945239ec3d5d68b /sys/vm/vm_pageout.c | |
parent | e7673b8424f1aac8b8d72dd1cc7bc1bcf9025d78 (diff) | |
download | src-30105b9ec4978454486149499b3dbe4545df0ca6.tar.gz src-30105b9ec4978454486149499b3dbe4545df0ca6.zip |
Don't remove all mappings of a swapped out process if the vm map contained
wired entries. vm_fault_unwire() depends on the mapping being intact.
Reviewed by: dillon
Notes
Notes:
svn path=/head/; revision=84933
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r-- | sys/vm/vm_pageout.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index be7df98e04b8..76920a0c2e9b 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -544,6 +544,7 @@ vm_pageout_map_deactivate_pages(map, desired) { vm_map_entry_t tmpe; vm_object_t obj, bigobj; + int nothingwired; GIANT_REQUIRED; if (lockmgr(&map->lock, LK_EXCLUSIVE | LK_NOWAIT, (void *)0, curthread)) { @@ -551,6 +552,7 @@ vm_pageout_map_deactivate_pages(map, desired) } bigobj = NULL; + nothingwired = TRUE; /* * first, search out the biggest object, and try to free pages from @@ -566,6 +568,8 @@ vm_pageout_map_deactivate_pages(map, desired) bigobj = obj; } } + if (tmpe->wired_count > 0) + nothingwired = FALSE; tmpe = tmpe->next; } @@ -592,7 +596,7 @@ vm_pageout_map_deactivate_pages(map, desired) * Remove all mappings if a process is swapped out, this will free page * table pages. */ - if (desired == 0) + if (desired == 0 && nothingwired) pmap_remove(vm_map_pmap(map), VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS); vm_map_unlock(map); |