From owner-cvs-all@FreeBSD.ORG Tue Jan 6 12:34:49 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 182F316A4CE for ; Tue, 6 Jan 2004 12:34:49 -0800 (PST) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1E2743D58 for ; Tue, 6 Jan 2004 12:34:39 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 5250 invoked from network); 6 Jan 2004 20:34:38 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 6 Jan 2004 20:34:38 -0000 Received: from atl544379.corp.weather.com (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i06KYKM0027250; Tue, 6 Jan 2004 15:34:20 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Don Lewis Date: Tue, 6 Jan 2004 15:03:03 -0500 User-Agent: KMail/1.5.4 References: <200401061928.i06JSH7E014631@gw.catspoiler.org> In-Reply-To: <200401061928.i06JSH7E014631@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401061503.03350.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: wpaul@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/compat/ndis kern_ndis.c ndis_var.h pe_var.h subr_ndis.c subr_ntoskrnl.c subr_pe.c src/sys/dev/if_ndis if_ndis.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2004 20:34:49 -0000 On Tuesday 06 January 2004 02:28 pm, Don Lewis wrote: > On 6 Jan, John Baldwin wrote: > > On 06-Jan-2004 Bill Paul wrote: > >> wpaul 2004/01/05 23:09:26 PST > >> > >> FreeBSD src repository > >> > >> Modified files: > >> sys/compat/ndis kern_ndis.c ndis_var.h pe_var.h > >> subr_ndis.c subr_ntoskrnl.c subr_pe.c > >> sys/dev/if_ndis if_ndis.c > >> Log: > >> - Change the implementation of KeInitializeSpinLock(). There is > >> no complementary KeFreeSpinLock() function, so creating a new > >> mutex on each call to KeInitializeSpinLock() leaks resources > >> when a driver is unloaded. For now, KeInitializeSpinLock() > >> returns a handle to the ntoskrnl interlock mutex. > > > > You could perhaps use a pool mutex if it helps lessen contention. Maybe > > something like: > > > > *lock = (kspin_lock)mtx_pool_alloc(&mtxpool_sleep); > > If these really need to be spin locks, a spin lock pool would need to be > created with mtx_pool_create(). It already exists (mtxpool_spin I believe). The ntoskrnl lock is a regular mutex though, so I'm guessing that a regular mutex is fine. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org