xfs
[Top] [All Lists]

Re: xfs deadlock during reclaim in _xfs_trans_alloc?

To: Peter Watkins <treestem@xxxxxxxxx>
Subject: Re: xfs deadlock during reclaim in _xfs_trans_alloc?
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 17 May 2011 11:49:08 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <BANLkTinyaam3pFub7QD4Xi=tn8WvFfmqJw@xxxxxxxxxxxxxx>
References: <BANLkTinyaam3pFub7QD4Xi=tn8WvFfmqJw@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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.

<Prev in Thread] Current Thread [Next in Thread>