diff options
author | tegge <tegge@FreeBSD.org> | 2001-10-14 20:51:14 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2001-10-14 20:51:14 +0000 |
commit | a9bfe7a4b3a7951f08960288f53ed37cee271817 (patch) | |
tree | 5cb2ff9b355db4d0261ace7b4945239ec3d5d68b | |
parent | 2ac23a80c8fd6e5deb7056e5e94673f210a49a81 (diff) | |
download | FreeBSD-src-a9bfe7a4b3a7951f08960288f53ed37cee271817.zip FreeBSD-src-a9bfe7a4b3a7951f08960288f53ed37cee271817.tar.gz |
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
-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 be7df98..76920a0 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); |