summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_ule.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2008-03-19 06:19:01 +0000
committerjeff <jeff@FreeBSD.org>2008-03-19 06:19:01 +0000
commit46f09d5bc3f6480ce5db48b9d76f3e83299f588c (patch)
tree720fece23c8482c35e341e275a0f4068ee43126f /sys/kern/sched_ule.c
parentf8600f40e7fcf241985d8a978c63889de0969bfb (diff)
downloadFreeBSD-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/kern/sched_ule.c')
-rw-r--r--sys/kern/sched_ule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 8bfec8d..67239ba 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -1843,7 +1843,6 @@ sched_nice(struct proc *p, int nice)
struct thread *td;
PROC_LOCK_ASSERT(p, MA_OWNED);
- PROC_SLOCK_ASSERT(p, MA_OWNED);
p->p_nice = nice;
FOREACH_THREAD_IN_PROC(p, td) {
@@ -1996,7 +1995,7 @@ sched_exit(struct proc *p, struct thread *child)
CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d",
child, child->td_name, child->td_priority);
- PROC_SLOCK_ASSERT(p, MA_OWNED);
+ PROC_LOCK_ASSERT(p, MA_OWNED);
td = FIRST_THREAD_IN_PROC(p);
sched_exit_thread(td, child);
}
OpenPOWER on IntegriCloud