xfs
[Top] [All Lists]

Re: [PATCH 07/12] repair: fix another ABBA deadlock in inode prefetching

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 07/12] repair: fix another ABBA deadlock in inode prefetching
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 13 Dec 2011 13:35:14 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20111202174742.307774458@xxxxxxxxxxxxxxxxxxxxxx>
References: <20111202174619.179530033@xxxxxxxxxxxxxxxxxxxxxx> <20111202174742.307774458@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Fri, Dec 02, 2011 at 12:46:26PM -0500, Christoph Hellwig wrote:
> The inode prefetching code has a fixed limit of inodes that might are
> submitted at a time.  Unfortunately the buffers for them get locked
> once the prefetching starts.  That way the threads processing the inode
> might get stuck on buffer locked, but not submitted for reading yet.
> 
> Fix this by kicking the queue as soon as we would have to wait on the
> ra_count semaphore.
> 
> Reported-by: Arkadiusz Mi??kiewicz <arekm@xxxxxxxx>
> Tested-by: Arkadiusz Mi??kiewicz <arekm@xxxxxxxx>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks safe - I can't think up a scenario that would deadlock on
the second sem_wait call...

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

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