From owner-cvs-all@FreeBSD.ORG Tue Aug 3 17:00:44 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 2397216A4D8 for ; Tue, 3 Aug 2004 17:00:43 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD19743D77 for ; Tue, 3 Aug 2004 17:00:41 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 19507 invoked from network); 3 Aug 2004 17:00:41 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 3 Aug 2004 17:00:41 -0000 Received: from 10.50.40.208 (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i73H0KPp026940; Tue, 3 Aug 2004 13:00:37 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Stephan Uphoff Date: Tue, 3 Aug 2004 12:56:15 -0400 User-Agent: KMail/1.6 References: <200408030258.i732wAfY098990@palm.tree.com> In-Reply-To: <200408030258.i732wAfY098990@palm.tree.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408031256.15886.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Maxime Henrion cc: Brian Fundakowski Feldman cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_map.c vm_map.h 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, 03 Aug 2004 17:00:44 -0000 On Monday 02 August 2004 10:58 pm, Stephan Uphoff wrote: > John Baldwin wrote: > > On Friday 30 July 2004 12:06 pm, Brian Fundakowski Feldman wrote: > > > On Fri, Jul 30, 2004 at 09:10:28AM +0000, Maxime Henrion wrote: > > > > mux 2004-07-30 09:10:28 UTC > > > > > > > > FreeBSD src repository > > > > > > > > Modified files: > > > > sys/vm vm_map.c vm_map.h > > > > Log: > > > > Get rid of another lockmgr(9) consumer by using sx locks for the > > > > user maps. We always acquire the sx lock exclusively here, but we > > > > can't use a mutex because we want to be able to sleep while holding > > > > the lock. This is completely equivalent to what we were doing with > > > > the lockmgr(9) locks before. > > > > > > Not that I don't think it's worth doing in general, but is there a > > > comparison anyone has done between speeds of sx and lockmgr? > > > > Speed aside, when allproc_lock and proctree_lock were lockmgr locks > > (before sx was implemented), my SMP machines routinely locked up and when > > I looked at things in the debugger it seemed that no one held > > allproc_lock but several processes were blocked on it. Quite frankly, I > > don't trust lockmgr()'s implementation. > > Since the vfs layer forces me to use the lockmgr you scared me into > taking a look. > And yes there is a bug in the current implementation. (kern/69934). Good catch! Unfortunately, the problems I was seeing above involved locks that didn't use upgrade or downgrade. :( I've pondered taking an axe to all of lockmgr and just rewriting it from scratch to use mutexes and cv's like sx. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org