From owner-cvs-all@FreeBSD.ORG Sat Aug 21 23:41:20 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 35DA016A4CE; Sat, 21 Aug 2004 23:41:20 +0000 (GMT) Received: from green.homeunix.org (pcp04371970pcs.nrockv01.md.comcast.net [69.140.223.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id C07AF43D45; Sat, 21 Aug 2004 23:41:19 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i7LNfHDT001178; Sat, 21 Aug 2004 19:41:17 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i7LNfHXi001177; Sat, 21 Aug 2004 19:41:17 -0400 (EDT) (envelope-from green) Date: Sat, 21 Aug 2004 19:41:16 -0400 From: Brian Fundakowski Feldman To: Alan Cox Message-ID: <20040821234116.GC784@green.homeunix.org> References: <200408211920.i7LJKLlA088634@repoman.freebsd.org> <20040821225939.GA784@green.homeunix.org> <20040821233134.GF9106@cs.rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040821233134.GF9106@cs.rice.edu> User-Agent: Mutt/1.5.6i cc: Alan Cox cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_fault.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: Sat, 21 Aug 2004 23:41:20 -0000 On Sat, Aug 21, 2004 at 06:31:34PM -0500, Alan Cox wrote: > On Sat, Aug 21, 2004 at 06:59:39PM -0400, Brian Fundakowski Feldman wrote: > > On Sat, Aug 21, 2004 at 07:20:21PM +0000, Alan Cox wrote: > > > alc 2004-08-21 19:20:21 UTC > > > > > > FreeBSD src repository > > > > > > Modified files: > > > sys/vm vm_fault.c > > > Log: > > > Further reduce the use of Giant by vm_fault(): Giant is held only when > > > manipulating a vnode, e.g., calling vput(). This reduces contention for > > > Giant during many copy-on-write faults, resulting in some additional > > > speedup on SMPs. > > > > > > Note: debug_mpsafevm must be enabled for this optimization to take effect. > > > > This is very broken. See included first attempt at fixing it without > > regard for actually trying to reimplement debug.mpsafenet for vnodes. > > > > Can you please explain what is broken? #1. Lock order reversal. Giant is acquired after the map read lock. #2. Unlocking Giant without it being locked. This occurs in both VM_UNLOCK_GIANT() lines I removed. I know this because my machine panicked on the other after I removed the first. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\