From 74fb2c91c6f4eca47abdec839f1c87192e268c15 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 19 Oct 2009 19:40:05 +0000 Subject: [PATCH] MFC 198126: Fix a sign bug in the handling of nice priorities when computing the interactive score for a thread. Approved by: re (kib) --- sys/kern/sched_ule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index fd14fc4021a..e0cff5f3647 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)