Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 2004 13:12:13 -0400
From:      Stephan Uphoff <ups@tree.com>
To:        Peter Holm <peter@holm.cc>
Cc:        "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: scheduler (sched_4bsd) questions
Message-ID:  <1096477932.3733.1471.camel@palm.tree.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1096477932.3733.1471.camel>