summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_sleepqueue.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-01-14 17:06:54 +0000
committerjhb <jhb@FreeBSD.org>2011-01-14 17:06:54 +0000
commitb92da6d9e230dcfd668f375fdb6ea6d66d69a1da (patch)
treeec8cec98b0e1b31de4d001513ee1a1ead145528f /sys/kern/subr_sleepqueue.c
parenta8f14f7c92063bb4b5e271afb698921204865fbc (diff)
downloadFreeBSD-src-b92da6d9e230dcfd668f375fdb6ea6d66d69a1da.zip
FreeBSD-src-b92da6d9e230dcfd668f375fdb6ea6d66d69a1da.tar.gz
Rework realtime priority support:
- Move the realtime priority range up above kernel sleep priorities and just below interrupt thread priorities. - Contract the interrupt and kernel sleep priority ranges a bit so that the timesharing priority band can be increased. The new timeshare range is now slightly larger than the old realtime + timeshare ranges. - Change the ULE scheduler to no longer use realtime priorities for interactive threads. Instead, the larger timeshare range is now split into separate subranges for interactive and non-interactive ("batch") threads. The end result is that interactive threads and non-interactive threads still use the same priority ranges as before, but realtime threads now have a separate, dedicated priority range. - Do not modify the priority of non-timeshare threads in sched_sleep() or via cv_broadcastpri(). Realtime and idle priority threads will no longer have their priorities affected by sleeping in the kernel. Reviewed by: jeff
Diffstat (limited to 'sys/kern/subr_sleepqueue.c')
-rw-r--r--sys/kern/subr_sleepqueue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index cdf7a47..5d1ae86 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -745,7 +745,8 @@ sleepq_resume_thread(struct sleepqueue *sq, struct thread *td, int pri)
/* Adjust priority if requested. */
MPASS(pri == 0 || (pri >= PRI_MIN && pri <= PRI_MAX));
- if (pri != 0 && td->td_priority > pri)
+ if (pri != 0 && td->td_priority > pri &&
+ PRI_BASE(td->td_pri_class) == PRI_TIMESHARE)
sched_prio(td, pri);
/*
OpenPOWER on IntegriCloud