Hello Juergen, "Juergen Hannken-Illjes" <hann...@netbsd.org> wrote: > Log Message: > The path getnewvnode()->getcleanvnode()->vclean()->VOP_LOCK() will panic > if the vnode we want to clean is a layered vnode and the caller already > locked its lower vnode. > > Change getnewvnode() to always allocate a fresh vnode and add a helper > thread (vdrain) to keep the number of allocated vnodes within > desiredvnodes. > > Rename getcleanvnode() to cleanvnode() and let it take a vnode from the > lists, clean and free it. > > <...> > > To generate a diff of this commit: > cvs rdiff -u -r1.11 -r1.12 src/sys/kern/vfs_vnode.c
Not that I object to the change, but such approach was already discussed in the past on tech-kern@ and rejected. See the follow ups of this thread: http://mail-index.netbsd.org/tech-kern/2009/08/17/msg005861.html This significantly changes the dynamics of vnode cache and reclamation, apart from making it single-threaded. Given the current locking scheme with its issues (and thus reclamation complexity), the change is probably good enough for the medium term. However, in the long term, I would say that getnewvnode() behaviour should be restored. -- Mindaugas