From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Cc: Pavel Machek <pavel@ucw.cz>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, salvet@ics.muni.cz
Subject: Re: Deadlock in NFSv4 in all kernels
Date: Tue, 25 May 2010 09:39:25 -0400 [thread overview]
Message-ID: <1274794765.5377.43.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <20100525125833.GB9731@ics.muni.cz>
On Tue, 2010-05-25 at 14:58 +0200, Lukas Hejtmanek wrote:
> Hi,
>
> On Tue, May 25, 2010 at 08:28:40AM -0400, Trond Myklebust wrote:
> > > Seems like pretty fundamental problem in nfs :-(. Limiting writeback
> > > caches for nfs, so that system has enough memory to perform rpc calls
> > > with the rest might do the trick, but...
> > >
> >
> > It's the same problem that you have for any file or storage system that
> > has initiators in userland. On the storage side, iSCSI in particular has
> > the same problem. On the filesystem side, CIFS, AFS, coda, .... do too.
> > The clustered filesystems can deadlock if the node that is running the
> > DLM runs out of memory...
> >
> > A few years ago there were several people proposing various solutions
> > for allowing these daemons to run in a protected memory environment to
> > avoid deadlocks, but those efforts have since petered out. Perhaps it is
> > time to review the problem?
>
> I saw some patches targeting 2.6.35 that should prevent some deadlocks. They
> seem to be not enough in some cases. rpc.* daemons should be mlocked for sure
> but there is a problem with libkrb that reads files using fread(). fread() uses
> anonymous mmap, under mlockall(MCL_FUTURE) this causes the anonymous map to be
> mapped instantly and it deadlocks.
>
> IBM GPFS also uses userspace daemon, but it seems that the deamon is mlocked
> and it does not open any files and does not create new connections.
Doesn't matter. Just writing to a socket or pipe may trigger a kernel
memory allocation which can result in an attempt to reclaim memory.
Furthermore, there is the issue of what to do when you really are OOM,
and the kernel cannot allocate more memory for you without reclaiming
it.
The schemes I'm talking about typically had special memory pools
preallocated for use by daemons, and would label the daemons using some
equivalent of the PF_MEMALLOC flag to prevent recursion into the
filesystem.
next prev parent reply other threads:[~2010-05-25 13:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-07 15:39 Lukas Hejtmanek
2010-05-24 21:24 ` Pavel Machek
2010-05-25 12:28 ` Trond Myklebust
2010-05-25 12:58 ` Lukas Hejtmanek
2010-05-25 13:39 ` Trond Myklebust [this message]
2010-05-25 14:07 ` Zdenek Salvet
2010-05-25 17:10 ` Sunil Mushran
2010-05-25 13:45 ` William A. (Andy) Adamson
2010-05-25 14:02 ` Lukas Hejtmanek
2010-05-25 14:10 ` William A. (Andy) Adamson
2010-05-25 14:29 ` Trond Myklebust
2010-05-25 14:04 ` Trond Myklebust
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=1274794765.5377.43.camel@heimdal.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=salvet@ics.muni.cz \
--cc=xhejtman@ics.muni.cz \
/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
all inboxes | Powered by JetHome®