Subject: Re: Buffers and vnodes
To: None <tech-kern@netbsd.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: tech-kern
Date: 06/25/2007 20:39:25
On Mon, Jun 25, 2007 at 11:30:16AM -0700, Bill Stouder-Studenmund wrote:
> On Mon, Jun 25, 2007 at 08:06:37PM +0200, Joerg Sonnenberger wrote:
> > Is it really a good idea to make the vnode locking even more
> > complicated?
> 
> Are you sure this will make vnode locking more complicated?

Well. We add a dependency of a subsystem that was currently not caring
about vnodes to the vnode locking. So far it sounds like a regression.
The real question for me is whether the access to a buf is hierachical
relative to a possible associated vnode or not.

In other words: if I have a buf and the associated vnode, can I get in
situation where I want to lock either the buf or the vnode and have the
other data structure locked independently? If not, they shouldn't be
related. If the answer is yes, does the buf lock depend on the vnode
being locked? Do we have callbacks that could trigger recursion? If not,
it would be nice to keep the buf locking as relative leaf. Otherwise the
question remains whether we can change it to have such a hierachy :-)

Joerg