From owner-freebsd-current@FreeBSD.ORG Fri Feb 17 18:43:47 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0ABC116A420; Fri, 17 Feb 2006 18:43:47 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id B61DF43D6E; Fri, 17 Feb 2006 18:43:41 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 9484272 for multiple; Fri, 17 Feb 2006 13:44:00 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k1HIhZOQ096998; Fri, 17 Feb 2006 13:43:39 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Fri, 17 Feb 2006 13:42:11 -0500 User-Agent: KMail/1.9.1 References: <20060215211534.GA78376@heff.fud.org.nz> In-Reply-To: <20060215211534.GA78376@heff.fud.org.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602171342.13451.jhb@freebsd.org> X-Virus-Scanned: ClamAV 0.87.1/1292/Fri Feb 17 04:39:02 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED,AWL autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Andrew Thompson Subject: Re: rwlock patch for bridge 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: Fri, 17 Feb 2006 18:43:47 -0000 On Wednesday 15 February 2006 16:15, Andrew Thompson wrote: > Hi, > > > Here is a patch that changes if_bridge to use rwlock(9) rather than the > handrolled ref counting. Can I please get it reviewed to ensure I have > the changes correct. I pondered if the order of unlocking the softc > mutex and grabbing the rlock mattered but decided it didn't. > It has passed a runtime test. > > > cheers, > > Andrew Have you thought about replacing both the mutex and ref-count with the single rwlock? (Perhaps that is infeasible, but it would be somewhat pointless to just lock one lock so you can turn around and lock the next.) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org