Subject: Re: split LFS vnode locks
To: Bill Studenmund <wrstuden@netbsd.org>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 12/15/2002 17:32:54
On Sun, Dec 15, 2002 at 03:33:50PM -0800, Bill Studenmund wrote:
> You CAN NOT sleep with a vnode lock held.

huh?  all of the file systems do this all the time.  every time
we need to read from disk, we'll sleep with the vnode lock held.
(well, this is true for read() and write() but not memory mappings for
UBCified file systems.)  even if the desired data is already in memory
but the buffer or page is locked, we'll sleep with the vnode lock held.

I agree that the train-wreck behavior of the current vnode locking design
is poor, but that's how it is.  if you want to avoid that, we should discuss
changing the vnode locking design such it doesn't have that problem.
the SVR4 vnode locking design would be a good place to start, since it
doesn't intrinsically have this problem.

-Chuck