diff options
author | jeff <jeff@FreeBSD.org> | 2008-03-19 06:19:01 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2008-03-19 06:19:01 +0000 |
commit | 46f09d5bc3f6480ce5db48b9d76f3e83299f588c (patch) | |
tree | 720fece23c8482c35e341e275a0f4068ee43126f /sys/vm/vm_pageout.c | |
parent | f8600f40e7fcf241985d8a978c63889de0969bfb (diff) | |
download | FreeBSD-src-46f09d5bc3f6480ce5db48b9d76f3e83299f588c.zip FreeBSD-src-46f09d5bc3f6480ce5db48b9d76f3e83299f588c.tar.gz |
- Relax requirements for p_numthreads, p_threads, p_swtick, and p_nice from
requiring the per-process spinlock to only requiring the process lock.
- Reflect these changes in the proc.h documentation and consumers throughout
the kernel. This is a substantial reduction in locking cost for these
fields and was made possible by recent changes to threading support.
Diffstat (limited to 'sys/vm/vm_pageout.c')
-rw-r--r-- | sys/vm/vm_pageout.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index bf899a6..a3ecc98 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1206,7 +1206,6 @@ unlock_and_continue: * If the process is in a non-running type state, * don't touch it. Check all the threads individually. */ - PROC_SLOCK(p); breakout = 0; FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); @@ -1219,7 +1218,6 @@ unlock_and_continue: } thread_unlock(td); } - PROC_SUNLOCK(p); if (breakout) { PROC_UNLOCK(p); continue; @@ -1249,9 +1247,7 @@ unlock_and_continue: sx_sunlock(&allproc_lock); if (bigproc != NULL) { killproc(bigproc, "out of swap space"); - PROC_SLOCK(bigproc); sched_nice(bigproc, PRIO_MIN); - PROC_SUNLOCK(bigproc); PROC_UNLOCK(bigproc); wakeup(&cnt.v_free_count); } @@ -1560,7 +1556,6 @@ vm_daemon() * if the process is in a non-running type state, * don't touch it. */ - PROC_SLOCK(p); breakout = 0; FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); @@ -1573,7 +1568,6 @@ vm_daemon() } thread_unlock(td); } - PROC_SUNLOCK(p); if (breakout) { PROC_UNLOCK(p); continue; |