On Sat, May 16, 2009 at 08:29:54AM +0000, YAMAMOTO Takashi wrote: > Module Name: src > Committed By: yamt > Date: Sat May 16 08:29:54 UTC 2009 > > Modified Files: > src/sys/kern: vfs_subr.c > src/sys/sys: vnode.h > > Log Message: > put a flag bit into v_usecount to prevent vtryget during getcleanvnode. > this fixes the following deadlock. > > a thread doing getcleanvnode: > pick a vnode > acqure v_interlock > v_usecount++ > call vclean > > now, another thread doing cache_lookup: > picks the vnode > vtryget succeed > vn_lock succeed > > now in vclean: > set VI_XLOCK (too late to be noticed by the competing thread) > wait on the vnode lock (this might violate locking order) > > the use of a flag bit was suggested by Andrew Doran. PR/41374.
Hi, do you think it could also help with kern/41417 ? cache_lookup seems also to be involved in this deadlock ... -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --