diff options
author | jeff <jeff@FreeBSD.org> | 2007-09-24 00:28:54 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-09-24 00:28:54 +0000 |
commit | ea91086eb3bb58ad24d41a614930a54819c9b9d0 (patch) | |
tree | cadbd231a4fe6a8ffe7d0fca71d6f6304341c42f /sys/kern | |
parent | 5328bd11db07bc15a5d7779bfc5f61f64128d0e2 (diff) | |
download | FreeBSD-src-ea91086eb3bb58ad24d41a614930a54819c9b9d0.zip FreeBSD-src-ea91086eb3bb58ad24d41a614930a54819c9b9d0.tar.gz |
- Bound the interactivity score so that it cannot become negative.
Approved by: re
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sched_ule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index df05473..4dc8ea5 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1410,7 +1410,7 @@ sched_priority(struct thread *td) * score. Negative nice values make it easier for a thread to be * considered interactive. */ - score = sched_interact_score(td) - td->td_proc->p_nice; + score = imax(0, sched_interact_score(td) - td->td_proc->p_nice); if (score < sched_interact) { pri = PRI_MIN_REALTIME; pri += ((PRI_MAX_REALTIME - PRI_MIN_REALTIME) / sched_interact) |