From owner-cvs-src@FreeBSD.ORG Tue Jun 22 04:38:08 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E653F16A4CE; Tue, 22 Jun 2004 04:38:08 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF9FD43D5D; Tue, 22 Jun 2004 04:38:08 +0000 (GMT) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5M4c8g0037281; Tue, 22 Jun 2004 04:38:08 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5M4c8Ul037280; Tue, 22 Jun 2004 04:38:08 GMT (envelope-from bde) Message-Id: <200406220438.i5M4c8Ul037280@repoman.freebsd.org> From: Bruce Evans Date: Tue, 22 Jun 2004 04:38:08 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_4 Subject: cvs commit: src/sys/kern kern_resource.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 04:38:09 -0000 bde 2004-06-22 04:38:08 UTC FreeBSD src repository Modified files: (Branch: RELENG_4) sys/kern kern_resource.c Log: Raise the ipl to splstatclock() in donice() before calling resetpriority(). This fixes races with schedcpu() and schedclock(). It corresponds to sched locking before the sched_nice() call in -current. Lock assertions made the races very obvious in -current. Adjust the process's priority after calling resetpriority() as in schedclock() to maintain the invariant that the current priority is always _the_ process's user priority if it is a user priority. This is to support uncommitted assertions that the priority is correct on return to user mode. The priority is correct here (modulo bugs elsewhere) but it needs to be set explicitly to satisfy the assertions. Revision Changes Path 1.55.2.6 +5 -0 src/sys/kern/kern_resource.c