From: Nathan Scott <nathans@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Matthew Wilcox <matthew@wil.cx>,
linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [LOCKDEP] xfs: possible recursive locking detected
Date: Tue, 4 Jul 2006 16:56:05 +1000 [thread overview]
Message-ID: <20060704165605.B1497438@wobbly.melbourne.sgi.com> (raw)
In-Reply-To: <20060704063225.GA2752@elte.hu>; from mingo@elte.hu on Tue, Jul 04, 2006 at 08:32:26AM +0200
On Tue, Jul 04, 2006 at 08:32:26AM +0200, Ingo Molnar wrote:
>
> * Nathan Scott <nathans@sgi.com> wrote:
>
> > > > While trying to remove 2 small files, 2 empty dirs and 1 empty dir
> > > > on xfs partition
> > >
> > > Probably spurious. xfs_ilock can be called on both the parent and
> > > child, which wouldn't be a deadlock.
> >
> > 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 lockdep code?
>
> correct, lockdep has to be taught about relations between locks within
> the same lock-class. (it detects relations between different
> lock-classes automatically) It's usually a straightforward process.
>
> In this particular case we probably need to do something similar to the
> VFS's 'enum inode_i_mutex_lock_class' subclass categorizations: we need
> xfs_ilock_nested(.., subclass), where in xfs_lock_dir_and_entry() we'd
> pass in ILOCK_PARENT. [normal locking calls have a default subclass ID
> of 0]
>
> I suspect simply creating an XFS filesystem and doing a couple of VFS
> ops on it should trigger these locking patterns?
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,
should be able to hit it pretty quickly with any simple filesystem
interaction though (root or not).
cheers.
--
Nathan
next prev parent reply other threads:[~2006-07-04 6:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-04 0:41 [LOCKDEP] xfs: possible recursive locking detected Alexey Dobriyan
2006-07-04 1:18 ` Matthew Wilcox
2006-07-04 1:25 ` Nathan Scott
2006-07-04 6:32 ` Ingo Molnar
2006-07-04 6:56 ` Nathan Scott [this message]
2006-07-04 8:41 ` Ingo Molnar
2006-07-04 9:11 ` Nathan Scott
2006-07-04 9:12 ` Ingo Molnar
2006-07-05 3:23 ` Nathan Scott
2006-07-05 4:44 ` Arjan van de Ven
2006-07-04 9:57 ` Ingo Molnar
2006-07-04 13:03 ` Ingo Molnar
2006-07-05 5:26 ` Nathan Scott
2006-07-05 6:46 ` Ingo Molnar
2006-07-05 6:58 ` Nathan Scott
2006-07-05 3:37 ` Nathan Scott
[not found] ` <20060704191100.C1497438__38681.8935432986$1152004607$gmane$org@wobbly.melbourne.sgi.com>
2006-07-04 12:42 ` Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060704165605.B1497438@wobbly.melbourne.sgi.com \
--to=nathans@sgi.com \
--cc=adobriyan@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=mingo@elte.hu \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).