From owner-freebsd-arch@FreeBSD.ORG Wed Sep 29 17:12:16 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CA7516A4CE for ; Wed, 29 Sep 2004 17:12:16 +0000 (GMT) Received: from duchess.speedfactory.net (duchess.speedfactory.net [66.23.201.84]) by mx1.FreeBSD.org (Postfix) with SMTP id B1B7E43D46 for ; Wed, 29 Sep 2004 17:12:15 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 7868 invoked by uid 89); 29 Sep 2004 17:12:14 -0000 Received: from duchess.speedfactory.net (66.23.201.84) by duchess.speedfactory.net with SMTP; 29 Sep 2004 17:12:14 -0000 Received: (qmail 7842 invoked by uid 89); 29 Sep 2004 17:12:14 -0000 Received: from unknown (HELO palm.tree.com) (66.23.216.49) by duchess.speedfactory.net with SMTP; 29 Sep 2004 17:12:14 -0000 Received: from [127.0.0.1] (localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id i8THCDmt015815; Wed, 29 Sep 2004 13:12:13 -0400 (EDT) (envelope-from ups@tree.com) From: Stephan Uphoff To: Peter Holm In-Reply-To: <1096467843.3733.1145.camel@palm.tree.com> References: <1095468747.31297.241.camel@palm.tree.com> <1095529353.31297.1192.camel@palm.tree.com> <1096135220.53798.17754.camel@palm.tree.com> <20040926075218.GA85983@peter.osted.lan> <1096339936.3733.279.camel@palm.tree.com> <20040928074926.GA99957@peter.osted.lan> <1096383103.3733.312.camel@palm.tree.com> <20040929085748.GA19695@peter.osted.lan> <1096467843.3733.1145.camel@palm.tree.com> Content-Type: text/plain Message-Id: <1096477932.3733.1471.camel@palm.tree.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 29 Sep 2004 13:12:13 -0400 Content-Transfer-Encoding: 7bit cc: Julian Elischer cc: "freebsd-arch@freebsd.org" Subject: Re: scheduler (sched_4bsd) questions X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 17:12:16 -0000 On Wed, 2004-09-29 at 10:24, Stephan Uphoff wrote: > On Wed, 2004-09-29 at 04:57, Peter Holm wrote: > > It's hard for me to tell if your patch has made any difference. > > The freeze is still there. I'll try to make the same test once more > > without your patches to see if I get the same pattern in freezes. > > I found some problems yesterday with mutex priority inheritance that > could potentially cause your freeze patterns. > > I will try to roll a preliminary patch as soon as the caffeine does its > magic. OK - here is a crude patch to fix some problems with mutex priority inheritance. My theory is that the clock thread gets stuck waiting on GIANT. During release/acquisition of a contested sleep mutex there are a few windows where a task can be preempted when actions (waking up blocked threads, ownership of the mutex, ..) need to be atomic as far as scheduling is concerned. Otherwise priority inheritance may fail. The patch uses critical_enter/critical_exit to protect these regions against preemption. It would be great if could run this in addition to the other patches. Stephan