xfs
[Top] [All Lists]

Re: [PATCH 3/4] xfs: allow assigning the tail lsn with the AIL lock held

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 3/4] xfs: allow assigning the tail lsn with the AIL lock held
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 24 Mar 2012 09:48:11 -0400
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20120321232956.GA5091@dastard>
References: <20120316175541.258282540@xxxxxxxxxxxxxxxxxxxxxx> <20120316175636.373605151@xxxxxxxxxxxxxxxxxxxxxx> <20120321232956.GA5091@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Mar 22, 2012 at 10:29:56AM +1100, Dave Chinner wrote:
> On Fri, Mar 16, 2012 at 01:55:44PM -0400, Christoph Hellwig wrote:
> > Provide a variant of xlog_assign_tail_lsn that has the AIL lock already
> > held.  By doing so we do an additional atomic_read + atomic_set under
> > the lock, which comes down to two instructions.
> > 
> > Switch xfs_trans_ail_update_bulk and xfs_trans_ail_delete_bulk to the
> > new version to reduce the number of lock roundtrips, and prepare for
> > a new addition that would require a third lock roundtrip in
> > xfs_trans_ail_delete_bulk.
> 
> What new addition is that? I don't see it in this patchset (maybe
> I'm just blind), so maybe this isn't necessary in the commit
> message?

The check for an empty AIL before waking up thread thread waiting for
it.  I'll add it to the commit log.

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