Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Aug 2004 21:58:00 -0400
From:      Brian Fundakowski Feldman <green@FreeBSD.org>
To:        Alan Cox <alc@cs.rice.edu>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/vm vm_fault.c
Message-ID:  <20040822015800.GE784@green.homeunix.org>
In-Reply-To: <20040822001559.GG9106@cs.rice.edu>
References:  <200408211920.i7LJKLlA088634@repoman.freebsd.org> <20040821225939.GA784@green.homeunix.org> <20040821233134.GF9106@cs.rice.edu> <20040821234116.GC784@green.homeunix.org> <20040822001559.GG9106@cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 21, 2004 at 07:15:59PM -0500, Alan Cox wrote:
> On Sat, Aug 21, 2004 at 07:41:16PM -0400, Brian Fundakowski Feldman wrote:
> > 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.
> 
> No, that is the order it has been in for months.  The other functions
> that acquire a map lock and Giant do the same.

Giant can never be acquired after another lock has been acquired :-(

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040822015800.GE784>