mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-05 01:30:43 +00:00
Map lock checks not needed anymore for swapping out. We don't use
map operations for it anymore. Certain deadlocks should never happen anymore.
This commit is contained in:
parent
58b248e254
commit
b5cfb15fad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15134
@ -59,7 +59,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: vm_glue.c,v 1.44 1996/04/03 05:23:36 dyson Exp $
|
||||
* $Id: vm_glue.c,v 1.45 1996/04/07 17:39:23 bde Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ddb.h"
|
||||
@ -472,6 +472,7 @@ scheduler(dummy)
|
||||
struct proc *pp;
|
||||
int ppri;
|
||||
|
||||
spl0();
|
||||
loop:
|
||||
while ((cnt.v_free_count + cnt.v_cache_count) < cnt.v_free_min) {
|
||||
VM_WAIT;
|
||||
@ -561,22 +562,11 @@ retry:
|
||||
(p->p_slptime <= 4))
|
||||
continue;
|
||||
|
||||
vm_map_reference(&p->p_vmspace->vm_map);
|
||||
/*
|
||||
* do not swapout a process that is waiting for VM
|
||||
* datastructures there is a possible deadlock.
|
||||
*/
|
||||
if (!lock_try_write(&p->p_vmspace->vm_map.lock)) {
|
||||
vm_map_deallocate(&p->p_vmspace->vm_map);
|
||||
continue;
|
||||
}
|
||||
vm_map_unlock(&p->p_vmspace->vm_map);
|
||||
/*
|
||||
* If the process has been asleep for awhile and had
|
||||
* most of its pages taken away already, swap it out.
|
||||
*/
|
||||
swapout(p);
|
||||
vm_map_deallocate(&p->p_vmspace->vm_map);
|
||||
didswap++;
|
||||
goto retry;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user