summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-11-02 04:25:59 +0000
committerjeff <jeff@FreeBSD.org>2003-11-02 04:25:59 +0000
commite8941020faeaacc1170c5ab92faa75b1cc622131 (patch)
tree2a0de5036fb5a708b7b9c54f2e1774b457a110ac /sys/kern
parent5c293e491d69436f938aa3d9c14f6604a3b091b1 (diff)
downloadFreeBSD-src-e8941020faeaacc1170c5ab92faa75b1cc622131.zip
FreeBSD-src-e8941020faeaacc1170c5ab92faa75b1cc622131.tar.gz
- In sched_prio() only force us onto the current queue if our priority is
being elevated (numerically smaller).
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sched_ule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 246adc4..1069342 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -934,7 +934,8 @@ sched_prio(struct thread *td, u_char prio)
* queue. We still call adjustrunqueue below in case kse
* needs to fix things up.
*/
- if (ke && (ke->ke_flags & KEF_ASSIGNED) == 0 &&
+ if (prio < td->td_priority && ke &&
+ (ke->ke_flags & KEF_ASSIGNED) == 0 &&
ke->ke_runq != KSEQ_CPU(ke->ke_cpu)->ksq_curr) {
runq_remove(ke->ke_runq, ke);
ke->ke_runq = KSEQ_CPU(ke->ke_cpu)->ksq_curr;
OpenPOWER on IntegriCloud