From: NeilBrown <neilb@suse.de>
To: Anna Schumaker <Anna.Schumaker@netapp.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Trond Myklebust <trond.myklebust@primarydata.com>,
Ingo Molnar <mingo@redhat.com>, <linux-fsdevel@vger.kernel.org>,
<linux-mm@kvack.org>, <linux-nfs@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Jeff Layton <jeff.layton@primarydata.com>
Subject: Re: [PATCH 3/4] NFS: avoid deadlocks with loop-back mounted NFS filesystems.
Date: Wed, 17 Sep 2014 09:37:57 +1000 [thread overview]
Message-ID: <20140917093757.472c8cf2@notabene.brown> (raw)
In-Reply-To: <54182F8B.8010302@Netapp.com>
[-- Attachment #1: Type: text/plain, Size: 1472 bytes --]
On Tue, 16 Sep 2014 08:39:39 -0400 Anna Schumaker <Anna.Schumaker@netapp.com>
wrote:
> On 09/16/2014 01:31 AM, NeilBrown wrote:
> > Support for loop-back mounted NFS filesystems is useful when NFS is
> > used to access shared storage in a high-availability cluster.
> >
> > If the node running the NFS server fails, some other node can mount the
> > filesystem and start providing NFS service. If that node already had
> > the filesystem NFS mounted, it will now have it loop-back mounted.
> >
> > nfsd can suffer a deadlock when allocating memory and entering direct
> > reclaim.
> > While direct reclaim does not write to the NFS filesystem it can send
> > and wait for a COMMIT through nfs_release_page().
>
> Is there anything that can be done on the nfsd side to prevent the deadlocks?
>
I went down that path first and it didn't work out.
Setting PF_FSTRANS in nfsd (when the request comes from localhost) and then
arranging the __GFP_FS is cleared when that flag is set overcomes a number of
possible deadlock sources, but not all.
There are a number of situations where nfsd is waiting on some other thread
(which doesn't have PF_FSTRANS set) and that thread tries to reclaim memory
and hits nfs_release_page().
It was a long and complex patch set, and nobody liked it.
And the common thread was always that it always blocked in nfs_release_page().
So it seemed to make sense to just remove that blockage.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2014-09-16 23:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 5:31 [PATCH 0/4] Remove possible deadlocks in nfs_release_page() NeilBrown
2014-09-16 5:31 ` [PATCH 1/4] SCHED: add some "wait..on_bit...timeout()" interfaces NeilBrown
2014-09-18 14:42 ` Peter Zijlstra
2014-09-23 2:10 ` NeilBrown
2014-09-23 21:30 ` Andrew Morton
2014-09-16 5:31 ` [PATCH 3/4] NFS: avoid deadlocks with loop-back mounted NFS filesystems NeilBrown
2014-09-16 12:39 ` Anna Schumaker
2014-09-16 23:37 ` NeilBrown [this message]
2014-09-16 5:31 ` [PATCH 2/4] MM: export page_wakeup functions NeilBrown
2014-09-16 5:31 ` [PATCH 4/4] NFS/SUNRPC: Remove other deadlock-avoidance mechanisms in nfs_release_page() NeilBrown
2014-09-16 22:04 ` Trond Myklebust
2014-09-17 1:10 ` NeilBrown
2014-09-17 1:32 ` Trond Myklebust
[not found] ` <CAHQdGtST5nEE-Wh99vKLNPsOHc_pSgau4om7dWr+GhfLauFBnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-17 3:12 ` NeilBrown
[not found] ` <20140916051911.22257.24658.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-09-16 11:47 ` [PATCH 0/4] Remove possible deadlocks " Jeff Layton
[not found] ` <20140916074741.1de870c5-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-09-16 23:41 ` NeilBrown
2014-09-17 0:19 ` Jeff Layton
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=20140917093757.472c8cf2@notabene.brown \
--to=neilb@suse.de \
--cc=Anna.Schumaker@netapp.com \
--cc=akpm@linux-foundation.org \
--cc=jeff.layton@primarydata.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=trond.myklebust@primarydata.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).