Date: Tue, 22 Jun 2004 04:38:08 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_resource.c Message-ID: <200406220438.i5M4c8Ul037280@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406220438.i5M4c8Ul037280>