xfs
[Top] [All Lists]

Re: [PATCH 10/12] xfs: introduce new locks for the log grant ticket wait

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 10/12] xfs: introduce new locks for the log grant ticket wait queues
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 20 Dec 2010 06:49:00 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1292215483-18224-11-git-send-email-david@xxxxxxxxxxxxx>
References: <1292215483-18224-1-git-send-email-david@xxxxxxxxxxxxx> <1292215483-18224-11-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Dec 13, 2010 at 03:44:41PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> The log grant ticket wait queues are currently protected by the log
> grant lock.  However, the queues are functionally independent from
> each other, and operations on them only require serialisation
> against other queue operations now that all of the other log
> variables they use are atomic values.
> 
> Hence, we can make them independent of the grant lock by introducing
> new locks just to protect the lists operations. because the lists
> are independent, we can use a lock per list and ensure that reserve
> and write head queuing do not contend.
> 
> To ensure forced shutdowns work correctly in conjunction with the
> new fast paths, ensure that we check whether the log has been shut
> down in the grant functions once we hold the relevant spin locks but
> before we go to sleep. This is needed to co-ordinate correctly with
> the wakeups that are issued on the ticket queues so we don't leave
> any processes sleeping on the queues during a shutdown.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>

Looks good,


Reviewed-by: Christoph Hellwig <hch@xxxxxx>

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