[Top] [All Lists]

Re: [3.0-stable PATCH 14/36] xfs: use shared ilock mode for direct IO wr

To: Mark Tinguely <tinguely@xxxxxxx>
Subject: Re: [3.0-stable PATCH 14/36] xfs: use shared ilock mode for direct IO writes by default
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 12 Dec 2012 10:43:08 +1100
Cc: stable@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20121203144310.102819754@xxxxxxx>
References: <20121203144208.143464631@xxxxxxx> <20121203144310.102819754@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Dec 03, 2012 at 05:42:22PM -0600, Mark Tinguely wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> Upstream commit: 507630b29f13a3d8689895618b12015308402e22
> For the direct IO write path, we only really need the ilock to be taken in
> exclusive mode during IO submission if we need to do extent allocation
> instead of all the time.
> Change the block mapping code to take the ilock in shared mode for the
> initial block mapping, and only retake it exclusively when we actually
> have to perform extent allocations.  We were already dropping the ilock
> for the transaction allocation, so this doesn't introduce new race windows.

I'm nervous about changing locking like this in -stable kernels.
It's a performance optimisation, not a bug fix, and it wasn't a
problem that xfstests uncovered. Also, xfstests doesn't really
stress the correctness of this code, which is another reason I'm
nervous about it....


Dave Chinner

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