From owner-freebsd-arch@FreeBSD.ORG Tue Mar 23 10:40:43 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 1323916A4EC for ; Tue, 23 Mar 2004 10:40:43 -0800 (PST) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD03343D3F for ; Tue, 23 Mar 2004 10:40:42 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 13520 invoked from network); 23 Mar 2004 18:40:42 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 23 Mar 2004 18:40:42 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i2NIeO28004934; Tue, 23 Mar 2004 13:40:24 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Maxim Konovalov Date: Tue, 23 Mar 2004 10:26:23 -0500 User-Agent: KMail/1.6 References: <200403160519.i2G5J0V6023193@urban> <200403221906.47238.john@baldwin.cx> <20040323073742.C62061@mp3files.int.ru> In-Reply-To: <20040323073742.C62061@mp3files.int.ru> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403231026.24155.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: arch@freebsd.org cc: David Schultz cc: Seigo Tanimura 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: Tue, 23 Mar 2004 18:40:43 -0000 On Monday 22 March 2004 11:40 pm, Maxim Konovalov wrote: > On Mon, 22 Mar 2004, 19:06-0500, John Baldwin wrote: > > [...] > > > > By the way, one thing to keep in mind is that Solaris has working > > > adaptive mutexes. For adaptive mutexes, the waiting case is > > > almost never supposed to happen, so it's more reasonable for them > > > to wake all waiters. However, AFAIK, FreeBSD's adaptive mutex > > > support is incomplete or broken at this point, so you may run into > > > a thundering herd problem if you wake all waiters. > > > > Adaptive mutexes work just fine, but they aren't on by default. In > > FreeBSD, adaptive mutexes spin so long as the owner is still executing on > > another CPU. > > With 'options ADATIVE_MUTEXES' our SMP testbox crashes very reliable. > If you are interested in a traceback and/or crashdump let me know. I can look at it. The bug is likely in some other code that is not really MP safe but is out from under Giant anyways as adaptive mutexes allow more concurrent execution and thus expose a lot more races. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org