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
This commit is contained in:
parent
e7673b8424
commit
30105b9ec4
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user