Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2009 11:41:12 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r198126 - head/sys/kern
Message-ID:  <200910151141.n9FBfCew072438@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Oct 15 11:41:12 2009
New Revision: 198126
URL: http://svn.freebsd.org/changeset/base/198126

Log:
  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

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==============================================================================
--- head/sys/kern/sched_ule.c	Thu Oct 15 11:32:05 2009	(r198125)
+++ head/sys/kern/sched_ule.c	Thu Oct 15 11:41:12 2009	(r198126)
@@ -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)



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