From: Christoph Hellwig <hch@infradead.org>
To: Peter Watkins <treestem@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: xfs deadlock during reclaim in _xfs_trans_alloc?
Date: Tue, 17 May 2011 11:49:08 -0400 [thread overview]
Message-ID: <20110517154907.GA17735@infradead.org> (raw)
In-Reply-To: <BANLkTinyaam3pFub7QD4Xi=tn8WvFfmqJw@mail.gmail.com>
On Tue, May 17, 2011 at 10:37:59AM -0400, Peter Watkins wrote:
> Greetings,
>
> I think I've hit another case when reclaim recurses into xfs and deadlocks.
>
> The system was under memory pressure and an fsync() call sent xfs into
> reclaim which blocked on the prune_icache mutex while holding an xfs
> inode buffer lock. Another thread, also in reclaim, held the
> prune_icache mutex but needed that xfs inode buffer lock to make
> progress.
>
> Perhaps _xfs_trans_alloc should not recurse into the filesystem if its
> allocation goes into reclaim? Should it say:
>
> tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP|KM_NOFS);
>
> I'll send a proposed patch in a second. (I'm on 2.6.27, but the patch
> will be against latest)
My patch "prune back iprune_sem" which landed in Linux 2.6.39 as commit
bab1d9444d9a147f1dc3478dd06c16f490227f3e should fix that at the VFS
level. I'm not sure how 2.6.27 looks in that area, but a lot of things
have changed so a backport might not be trivial.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2011-05-17 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-17 14:37 xfs deadlock during reclaim in _xfs_trans_alloc? Peter Watkins
2011-05-17 15:49 ` Christoph Hellwig [this message]
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=20110517154907.GA17735@infradead.org \
--to=hch@infradead.org \
--cc=treestem@gmail.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