Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 May 2004 00:12:33 -0400
From:      Brian Fundakowski Feldman <green@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Subject:   Re: LOR: /sys/ufs/ffs/ffs_snapshot.c:1893 /sys/vm/vm_map.c:2206 
Message-ID:  <200405010412.i414CXv5081486@green.homeunix.org>
In-Reply-To: Message from Robert Watson <rwatson@FreeBSD.org>  <Pine.NEB.3.96L.1040430221157.63854C-100000@fledge.watson.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson <rwatson@FreeBSD.org> wrote:
> 
> On Fri, 30 Apr 2004, Brian Fundakowski Feldman wrote:
> 
> > I haven't seen it myself, but it seems like it's only going to happen
> > sometimes (when a full page is freed).  There's really no technical
> > reason you'd ever want to do a free(9) with locks held, so I suggest
> > fixing it in the straightforward way. 
> 
> While I sympathize with this point, I don't think it's realistic to assert
> that free() will never be called while helding a lock.  Once the mbuf
> allocator backs into regular malloc() and free(); the network stack relies
> on being able to perform wait-free allocation and free while locks are
> held, since it uses locks as a light-weight form of reference-counting.

Well, there's locks, and then there's mutexes; the vnode interlock is a 
mutex that is really, really not supposed to be slept while holding.

-- 
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?200405010412.i414CXv5081486>