From: Dave Chinner <david@fromorbit.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
Mike Marshall <hubcap@omnibond.com>,
Christoph Hellwig <hch@lst.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Boaz Harrosh <ooo@electrozaur.com>,
Greg Kroah-Hartman <greg@kroah.com>
Subject: Re: [GIT PULL] Orangefs (text only resend)
Date: Tue, 8 Sep 2015 12:49:28 +1000 [thread overview]
Message-ID: <20150908024927.GQ26895@dastard> (raw)
In-Reply-To: <20150908004754.GA690@thunk.org>
On Mon, Sep 07, 2015 at 08:47:54PM -0400, Theodore Ts'o wrote:
> On Tue, Sep 08, 2015 at 12:22:06AM +0100, Al Viro wrote:
> > You don't want e.g. to have allocation request triggering an attempt to write
> > a dirty page on a shared mapping of a file from your fs while you are holding
> > a mutex that would block that attempt *and* waiting for a allocation to
> > succeed.
>
> Mike,
>
> To be more explicit --- any code in your writepage/writepages
> function, or code called from your writepage/writepages function has
> to do all of its allocations using GFP_NOFS. Otherwise, you can end
> up in a recursion where an attempt to writeback a page can trigger the
> VM system to try to writeback either the same page or another page,
> and then Hilarity Ensues, with either the code self-deadlocking, or in
> the best case, the kernel stack getting overrun.
FWIW, lockdep will issue warnings on these potentially recursive
allocations, which can help you find them without having to first
deadlock the machine.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2015-09-08 2:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 15:42 [GIT PULL] Orangefs (text only resend) Mike Marshall
2015-09-02 23:34 ` Linus Torvalds
2015-09-03 1:13 ` Mike Marshall
2015-09-03 1:28 ` Linus Torvalds
2015-09-03 20:22 ` Linus Torvalds
2015-09-03 22:18 ` Mike Marshall
2015-09-03 22:44 ` Greg Kroah-Hartman
2015-09-06 6:35 ` Christoph Hellwig
2015-09-06 9:08 ` Al Viro
2015-09-06 14:52 ` Mike Marshall
2015-09-06 15:00 ` Mike Marshall
2015-09-06 20:20 ` Al Viro
2015-09-07 6:37 ` Al Viro
2015-09-07 21:10 ` Mike Marshall
2015-09-07 23:22 ` Al Viro
2015-09-08 0:47 ` Theodore Ts'o
2015-09-08 2:49 ` Dave Chinner [this message]
2015-09-08 14:48 ` Christoph Hellwig
2015-09-08 18:21 ` Mike Marshall
2015-09-09 15:05 ` Mike Marshall
2015-09-11 21:12 ` Mike Marshall
2015-09-11 22:24 ` Al Viro
2015-09-13 11:56 ` Mike Marshall
2015-09-11 23:20 ` Linus Torvalds
2015-09-13 11:59 ` Mike Marshall
2015-09-06 14:35 ` Mike Marshall
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=20150908024927.GQ26895@dastard \
--to=david@fromorbit.com \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=hch@lst.de \
--cc=hubcap@omnibond.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ooo@electrozaur.com \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=viro@ZenIV.linux.org.uk \
/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).