From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 19 19:40:05 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98DB1106566C; Mon, 19 Oct 2009 19:40:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86CB38FC13; Mon, 19 Oct 2009 19:40:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9JJe5TH010740; Mon, 19 Oct 2009 19:40:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9JJe58R010738; Mon, 19 Oct 2009 19:40:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200910191940.n9JJe58R010738@svn.freebsd.org> From: John Baldwin Date: Mon, 19 Oct 2009 19:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198246 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2009 19:40:05 -0000 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)