From owner-freebsd-arch@FreeBSD.ORG Thu Mar 25 18:30:32 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E71E916A4CE; Thu, 25 Mar 2004 18:30:31 -0800 (PST) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.12.11/8.12.11) with ESMTP id i2Q2UUX6097935; Thu, 25 Mar 2004 21:30:30 -0500 (EST) (envelope-from green@green.homeunix.org) Received: from localhost (green@localhost)i2Q2UTNZ097932; Thu, 25 Mar 2004 21:30:29 -0500 (EST) (envelope-from green@green.homeunix.org) Message-Id: <200403260230.i2Q2UTNZ097932@green.homeunix.org> X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: John Baldwin In-Reply-To: Message from John Baldwin of "Tue, 23 Mar 2004 17:24:45 EST." <200403231724.45923.jhb@FreeBSD.org> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Thu, 25 Mar 2004 21:30:29 -0500 Sender: green@green.homeunix.org cc: Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= cc: David Schultz cc: Seigo Tanimura cc: arch@FreeBSD.org Subject: Re: Is MTX_CONTESTED evil? 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: Fri, 26 Mar 2004 02:30:32 -0000 John Baldwin wrote: > On Tuesday 23 March 2004 03:06 pm, Dag-Erling Sm=C3=B8rgrav wrote: > > des@des.no (Dag-Erling Sm=C3=B8rgrav) writes: > > > John Baldwin writes: > > > > Adaptive mutexes work just fine, but they aren't on by default. > > > > > > No, they don't "work just fine", unless of course they are *suppose= d* > > > to cause frequent panics. > > > > s/panic/freeze/ > = > They worked just fine on sparc64, alpha, and i386 when they were develo= ped and = > nothing has changed since then. However, since they increase the chanc= es of = > "near concurrency" on multiple CPUs (i.e. one CPU grabbing a lock right= after = > another released it) they expose races and thus bugs in code that uses = > mutexes improperly. The fault is not in adaptive mutexes, but in the o= ther = > broken code, just as compile failures aren't the result of the tinderbo= x = > itself being broken. :-) Well, that certainly explains the blitz of crashes I had to fix recently!= = Since INVARIANTS and WITNESS are on by default, it would make sense to ma= ke = ADAPTIVE_MUTEX default to catch more bugs. -- = Brian Fundakowski Feldman \'[ FreeBSD ]''''''''= ''\ <> green@FreeBSD.org \ The Power to Serv= e! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,= ,,,,\