From owner-freebsd-current@FreeBSD.ORG Tue Nov 27 21:59:44 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3205916A468 for ; Tue, 27 Nov 2007 21:59:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id D47C413C46E for ; Tue, 27 Nov 2007 21:59:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8p) with ESMTP id 221577483-1834499 for multiple; Tue, 27 Nov 2007 16:57:39 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id lARLxIol022065; Tue, 27 Nov 2007 16:59:22 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Tue, 27 Nov 2007 16:42:06 -0500 User-Agent: KMail/1.9.6 References: <4744EBA4.7020209@clearchain.com> <2a41acea0711270925w55742526n7ef77b1fcef3016f@mail.gmail.com> In-Reply-To: <2a41acea0711270925w55742526n7ef77b1fcef3016f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200711271642.07616.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 27 Nov 2007 16:59:22 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/4933/Tue Nov 27 14:10:57 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Jack Vogel , Mark Atkinson Subject: Re: em0 panic: mutex em0 not owned X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2007 21:59:44 -0000 On Tuesday 27 November 2007 12:25:52 pm Jack Vogel wrote: > On Nov 27, 2007 8:10 AM, Mark Atkinson wrote: > > > > > Is this expected after the fix? > > > > acquiring duplicate lock of same type: "network driver" > > 1st em0 @ /usr/src/sys/dev/em/if_em.c:1018 > > 2nd em0 @ /usr/src/sys/dev/em/if_em.c:1252 > > Same type, different lock, I don't see a problem unless > there's some subtle thing I'm not aware of? Give them unique names then so witness can track them separately. :) The MTX_NETWORK_LOCK is really there so witness can track all driver locks at the same point in the hierarchy it uses to track lock orders. If you have a primary lock for the driver you can leave it as MTX_NETWORK_LOCK but use different types for other locks in the driver. For example: mtx_init(&sc->lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); mtx_init(&sc->tx_ring_lock, device_get_nameunit(dev), "tx ring lock", MTX_DEF); -- John Baldwin