2.6.17-912b2539e1e062cec73e2e61448e507f7719bd08 While trying to remove 2 small files, 2 empty dirs and 1 empty dir on xfs partition == [ INFO: possible recursive locking detected ] -- rm/7596 is tryi
Hmm... they'd be different inodes though, so different lock addresses in memory - is lockdep taking that into account? Would we need to go annotate xfs_ilock somehow to give better hints to the lockd
Yep, looks like its really easy to trigger - I pulled Linus' tree, enabled everything I could see that looked lockdep related and I immediately saw warnings during bootup... that was with an XFS root
the patch below should solve the case mentioned above, but i'm sure there will be other cases as well. XFS locking seems quite complex all around. All this dynamic flag-passing into an opaque functio
Thanks Ingo! I'll run with this for awhile and see if I can find any other issues. Mhmm. Right... but that leaves plenty that don't, and they're not simple to change. There are generic routines that
do you have anything in there that spinlock/mutex debugging or lockdep does not catch? If yes then i'll add it to the generic lock debugging code. Ingo
the main variation in xfs_iget() is whether we lock the inode read-write, read-only or not at all, correct? (XFS_ILOCK_EXCL, XFS_ILOCK_SHARED and 0) That could be cleaned up the following way: - rena
another thing: i have added real 'lock allocation debugging' (CONFIG_DEBUG_LOCK_ALLOC) to the kernel, which covers spinlocks, rwlocks, mutexes and rw-semaphores. It does the following: This feature w
The thing we're catching automatically there is potential ordering violations on the XFS inode iolock vs ilock. I don't know if the other methods can help us there too or not. cheers. -- Nathan
*nod*. One difficulty is that xfs_iget_core would also need this treatment (the lock_mode parameter is passed down there), and we may end up be with quite a few functions and/or duplicated code. But
Hmm, don't think so - only if you needed to change all other spinlock uses in the kernel to have a teardown too? Can't see that in current git trees, anyway, so I expect that to be OK as is. cheers.
i should have formulated this as a question: should i implement spin_lock_destroy()? A few months ago i implemented mutex_destroy() for XFS's use, and now we could do it for spinlocks too. Right now
2.6.17-912b2539e1e062cec73e2e61448e507f7719bd08 While trying to remove 2 small files, 2 empty dirs and 1 empty dir on xfs partition == [ INFO: possible recursive locking detected ] -- rm/7596 is tryi
Hmm... they'd be different inodes though, so different lock addresses in memory - is lockdep taking that into account? Would we need to go annotate xfs_ilock somehow to give better hints to the lockd
Yep, looks like its really easy to trigger - I pulled Linus' tree, enabled everything I could see that looked lockdep related and I immediately saw warnings during bootup... that was with an XFS root