diff options
author | John Baldwin <jhb@FreeBSD.org> | 2001-01-25 01:38:09 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2001-01-25 01:38:09 +0000 |
commit | 45ece682fdf58bb78484df9ad18f6bc1753e5072 (patch) | |
tree | 2e0d0b0000bb982a57a00acce7ac9e3f62e76e94 /sys/vm | |
parent | 7b1bec368fe40959236fcd704b04cbb7b782fbd4 (diff) | |
download | src-45ece682fdf58bb78484df9ad18f6bc1753e5072.tar.gz src-45ece682fdf58bb78484df9ad18f6bc1753e5072.zip |
- Doh, lock faultin() with proc lock in scheduler().
- Lock p_swtime with sched_lock in scheduler() as well.
Notes
Notes:
svn path=/head/; revision=71610
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_glue.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index f91540306158..b76c855d1d3a 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -318,10 +318,12 @@ faultin(p) ++p->p_lock; mtx_exit(&sched_lock, MTX_SPIN); + PROC_UNLOCK(p); mtx_assert(&Giant, MA_OWNED); pmap_swapin_proc(p); + PROC_LOCK(p); mtx_enter(&sched_lock, MTX_SPIN); if (p->p_stat == SRUN) { setrunqueue(p); @@ -401,8 +403,12 @@ loop: /* * We would like to bring someone in. (only if there is space). */ + PROC_LOCK(p); faultin(p); + PROC_UNLOCK(p); + mtx_enter(&sched_lock, MTX_SPIN); p->p_swtime = 0; + mtx_exit(&sched_lock, MTX_SPIN); goto loop; } |