Subject: Re: split LFS vnode locks
To: Chuck Silvers <chuq@chuq.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 12/16/2002 12:22:38
On Sun, 15 Dec 2002, Chuck Silvers wrote:

> On Sun, Dec 15, 2002 at 03:33:50PM -0800, Bill Studenmund wrote:
> > You CAN NOT sleep with a vnode lock held.

Ok, you CAN NOT sleep "for long" with a vnode lock held.

Since the code in question here is waiting for the cleaner to run, I think
it still counts as, "for long," and so sleeping w/ the lock held will be
problematic. We might get away with it, we might not.

> 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.

I'm up for that discussion.

Take care,

Bill