diff options
author | jhb <jhb@FreeBSD.org> | 2009-10-15 11:41:12 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-10-15 11:41:12 +0000 |
commit | f88b32f139a5e8b2b91b99937b72aa0fab472bf4 (patch) | |
tree | 31a506ce3cb431043c7e0298966bc6fe62ce5168 /sys/kern/sched_ule.c | |
parent | 9902cc8e38ae6a34d96208f86b2d403167c8dda4 (diff) | |
download | FreeBSD-src-f88b32f139a5e8b2b91b99937b72aa0fab472bf4.zip FreeBSD-src-f88b32f139a5e8b2b91b99937b72aa0fab472bf4.tar.gz |
Fix a sign bug in the handling of nice priorities when computing the
interactive score for a thread.
Submitted by: Taku YAMAMOTO taku of tackymt.homeip.net
Reviewed by: jeff
MFC after: 3 days
Diffstat (limited to 'sys/kern/sched_ule.c')
-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 fd14fc4..e0cff5f 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1406,7 +1406,7 @@ sched_priority(struct thread *td) * score. Negative nice values make it easier for a thread to be * considered interactive. */ - score = imax(0, 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) |