svn commit: r198246 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern

John Baldwin jhb at FreeBSD.org
Mon Oct 19 19:40:05 UTC 2009


Author: jhb
Date: Mon Oct 19 19:40:05 2009
New Revision: 198246
URL: http://svn.freebsd.org/changeset/base/198246

Log:
  MFC 198126:
  Fix a sign bug in the handling of nice priorities when computing the
  interactive score for a thread.
  
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/sched_ule.c

Modified: stable/8/sys/kern/sched_ule.c
==============================================================================
--- stable/8/sys/kern/sched_ule.c	Mon Oct 19 19:14:04 2009	(r198245)
+++ stable/8/sys/kern/sched_ule.c	Mon Oct 19 19:40:05 2009	(r198246)
@@ -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)


More information about the svn-src-stable-8 mailing list