From owner-freebsd-arch@FreeBSD.ORG Sun Jan 25 08:50:31 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9EDA106566B for ; Sun, 25 Jan 2009 08:50:31 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outU.internet-mail-service.net (outu.internet-mail-service.net [216.240.47.244]) by mx1.freebsd.org (Postfix) with ESMTP id D2BC28FC22 for ; Sun, 25 Jan 2009 08:50:31 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id BE12424D0; Sun, 25 Jan 2009 00:36:40 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 57A392D600E; Sun, 25 Jan 2009 00:36:40 -0800 (PST) Message-ID: <497C249C.5060507@elischer.org> Date: Sun, 25 Jan 2009 00:36:44 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Poul-Henning Kamp References: <23211.1232871523@critter.freebsd.dk> In-Reply-To: <23211.1232871523@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: need for another mutex type/flag? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 08:50:32 -0000 Poul-Henning Kamp wrote: > In message <497BA91D.805@elischer.org>, Julian Elischer writes: > >> I would like to be able to add a flag to a mutex >> that tags it as a 'leaf' mutex. As a result it would be illegal >> to take any other mutex while holding a leaf mutex. > > I second that, even if the flag is purely documentary, it is a > good idea. > Even purely documentary would be good but given the option, I'd like it to scream when Witness is enabled and you try get another mutex.... there are certain contexts (e.g. in most netgraph nodes) where we really want the authors to only take such locks and taking more unpredictable mutexes plays havoc with netgraph response times as a system as a whole, since if one node blocks, teh thread doesn't get to go off and service other nodes.