From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Cc: jack@suse.cz, oleg@redhat.com
Subject: [PATCH 0/2] xfs: kill lockdep false positives from readdir
Date: Wed, 12 Aug 2015 08:04:06 +1000 [thread overview]
Message-ID: <1439330648-1057-1-git-send-email-david@fromorbit.com> (raw)
Hi Folks,
These two patches change the XFS directory locking to shut up
lockdep. Ever since we changed the locking to serialise readdir via
the ILOCK for CXFS, lockdep has been producing false positive
warnings because filldir can trigger page faults and lockdep can't
be easily told that you can't take page faults on directory inodes
so it warns about all sorts of stuff that just can't deadlock.
To fix this, we need to change the directory locking (again!)
to use a different structure that separates the page fault path out
from underneath the ILOCK. TO do this, we have to treat the
directory data the same way we treat file data: The IOLOCK
serialises access to the data sections of the inode, the ILOCK
serialises access to the metadata sections of the inode.
This means that we need to take the IOLOCK in operations that modify
the directory data, which means we need nested PARENT lockdep
annotations because we need to lock two inodes at a time, so the
inode subclass lockdep annotations need a complete rework to support
this. This annotation rework is the first patch in the series.
THe second patch in the series is the directory locking rework. It's
all relatively straight forward - on modification the IOLOCK is
taken EXCL before we start transactions, the transaction join is modified
to understand the IOLOCK is also held, and the transaction commit
releases the IOLOCK. On readdir, we hold the IOLOCK in SHARED mode
across the readdir operation, and only hold the ILOCK when doing
operations that walk the extent tree and map directory buffers.
Oleg and Jan, this patchset should fix the lockdep issues that have
been seen with the freeze rework. Oleg, can you you try it with your
current patchset and testing and let me know if there are any issues
that you see?
Cheers,
Dave.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2015-08-11 22:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 22:04 Dave Chinner [this message]
2015-08-11 22:04 ` [PATCH 1/2] xfs: clean up inode lockdep annotations Dave Chinner
2015-08-14 19:41 ` Brian Foster
2015-08-11 22:04 ` [PATCH 2/2] xfs: stop holding ILOCK over filldir callbacks Dave Chinner
2015-08-14 19:41 ` Brian Foster
2015-08-14 22:39 ` Dave Chinner
2015-08-15 13:01 ` Brian Foster
2015-08-15 22:56 ` Dave Chinner
2015-08-12 11:42 ` [PATCH 0/2] xfs: kill lockdep false positives from readdir Oleg Nesterov
2015-08-12 11:43 ` Oleg Nesterov
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=1439330648-1057-1-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=jack@suse.cz \
--cc=oleg@redhat.com \
--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