From: Dave Chinner <david@fromorbit.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
xfs@oss.sgi.com
Subject: Re: xfs i_lock vs mmap_sem lockdep trace.
Date: Mon, 31 Mar 2014 11:40:53 +1100 [thread overview]
Message-ID: <20140331004053.GA17603@dastard> (raw)
In-Reply-To: <20140330235717.GO18016@ZenIV.linux.org.uk>
On Mon, Mar 31, 2014 at 12:57:17AM +0100, Al Viro wrote:
> On Mon, Mar 31, 2014 at 10:43:35AM +1100, Dave Chinner wrote:
> > filldir on a directory inode vs page fault on regular file. Known
> > issue, definitely a false positive. We have to change locking
> > algorithms to avoid such deficiencies of lockdep (a case of "lockdep
> > considered harmful", perhaps?) so it's not something I'm about to
> > rush...
>
> Give i_lock on directories a separate class, as it's been done for i_mutex...
Already done that. Commit:
93a8614 xfs: fix directory inode iolock lockdep false positive
This just changes where the false positives come from. This
insanity, for example, where shmem instantiates an inode in the page
fault path and so triggers selinux related lockdep fun:
http://oss.sgi.com/archives/xfs/2014-02/msg00618.html
and this with reclaim state contexts:
http://oss.sgi.com/archives/xfs/2014-03/msg00145.html
I even hacked a patch to move the inode classes to per-fstype classes,
and that just pushed the false positive somewhere else. It's just
another horrible game of whack-a-mole, caused by XFS doing something
different. The first possible fix:
http://oss.sgi.com/archives/xfs/2014-03/msg00146.html
is a bit of a big hammer approach, so the approach I'm looking at is
the "don't cache mappings in readdir" solution noted here:
http://oss.sgi.com/archives/xfs/2014-03/msg00163.html
Note that the problem that the additional locking added in 3.13
resolved can not be triggered by anything using the VFS for
directory access. The issues is that one of SGI's plug-ins (CXFS)
can access directories without going through the VFS and so the
internal XFS locking needs to serialise readdir vs directory
modification safely....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2014-03-31 0:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-29 22:31 xfs i_lock vs mmap_sem lockdep trace Dave Jones
2014-03-30 23:43 ` Dave Chinner
2014-03-30 23:57 ` Al Viro
2014-03-31 0:40 ` Dave Chinner [this message]
2014-04-08 20:40 ` Sasha Levin
2014-04-10 22:52 ` Dave Chinner
2014-03-31 0:20 ` Dave Jones
2014-03-31 0:42 ` Dave Chinner
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=20140331004053.GA17603@dastard \
--to=david@fromorbit.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
--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