From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 19 15:27:09 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFBD3106567F for ; Tue, 19 Aug 2008 15:27:09 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from gw.sandvine.com (gw.sandvine.com [199.243.201.138]) by mx1.freebsd.org (Postfix) with ESMTP id A08678FC13 for ; Tue, 19 Aug 2008 15:27:09 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by gw.sandvine.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 19 Aug 2008 11:26:07 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id AC4CB11703; Tue, 19 Aug 2008 11:26:07 -0400 (EDT) Date: Tue, 19 Aug 2008 11:26:07 -0400 From: Ed Maste To: Julian Elischer Message-ID: <20080819152607.GA44331@sandvine.com> References: <200808181754.18812.max@love2party.net> <20080818162411.GA77460@sandvine.com> <48A9BFED.604@elischer.org> <48A9C1B0.5010805@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48A9C1B0.5010805@elischer.org> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 19 Aug 2008 15:26:07.0873 (UTC) FILETIME=[E6EB8710:01C9020F] Cc: freebsd-hackers@freebsd.org Subject: Re: Acquiring a mtx after an sx lock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 15:27:10 -0000 On Mon, Aug 18, 2008 at 11:38:40AM -0700, Julian Elischer wrote: > >Ed Maste wrote: > >>Ahh, it seems ups' commit of rmlocks changed the "You have: sx_lock, > >>You want: Slp_mtx" case from no to ok (in r173444). > > Ignore me.. I was reading the table backwards.. of course if you have > an sx you can still take out a mutex, but not visa versa. Yep, and ups' r173444 change didn't affect this at all, it just corrected the table. If I don't hear otherwise I'll merge the changes to the table to 7 sometime soon: You have: You want: Spin_mtx Slp_mtx sx_lock rw_lock sleep - SPIN mutex ok no no no no-3 + SPIN mutex ok-1 no no no no-3 Sleep mutex ok ok-1 no ok no-3 - sx_lock ok no ok-2 no ok-4 + sx_lock ok ok ok-2 ok ok-4 rw_lock ok ok no ok-2 no-3 Have SPIN / want SPIN adds the "Recursion is defined per lock" footnote. Have sx / want Slp & have sx / want rw change from no to ok. - Ed