Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 2009 19:45:58 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r198247 - in stable/7/sys: . contrib/pf kern
Message-ID:  <200910191945.n9JJjw0X010905@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Mon Oct 19 19:45:57 2009
New Revision: 198247
URL: http://svn.freebsd.org/changeset/base/198247

Log:
  MFC 198126:
  Fix a sign bug in the handling of nice priorities when computing the
  interactive score for a thread.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/kern/sched_ule.c

Modified: stable/7/sys/kern/sched_ule.c
==============================================================================
--- stable/7/sys/kern/sched_ule.c	Mon Oct 19 19:40:05 2009	(r198246)
+++ stable/7/sys/kern/sched_ule.c	Mon Oct 19 19:45:57 2009	(r198247)
@@ -1474,7 +1474,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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910191945.n9JJjw0X010905>