From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v2] xfs: re-enable xfsaild idle mode and fix associated races
Date: Wed, 20 Jun 2012 11:59:58 -0400 [thread overview]
Message-ID: <4FE1F37E.6090706@redhat.com> (raw)
In-Reply-To: <20120620080523.GA26167@infradead.org>
On 06/20/2012 04:05 AM, Christoph Hellwig wrote:
> On Thu, Jun 07, 2012 at 12:49:53PM -0400, Brian Foster wrote:
[snip]
>> spin_lock(&ailp->xa_lock);
>> +
>> + /* barrier matches the xa_target update in xfs_ail_push() */
>> + smp_rmb();
>> + target = ailp->xa_target;
>> + ailp->xa_target_prev = target;
>> +
>> lip = xfs_trans_ail_cursor_first(ailp, &cur, ailp->xa_last_pushed_lsn);
>> if (!lip) {
>> /*
>> +
>> + spin_lock(&ailp->xa_lock);
>> +
>> + /*
>> + * Idle if the AIL is empty and we are not racing with a target
>> + * update. The barrier matches the xa_target update in
>> + * xfs_ail_push().
>> + */
>> + smp_rmb();
>
> Given that both sides are under xa_lock I can't see any need for
> barriers here.
>
Actually now that I look at it, it appears xfs_trans_ail_copy_lsn() does
not necessarily acquire the xa_lock...
Brian
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-06-20 15:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 16:49 [PATCH v2] xfs: re-enable xfsaild idle mode and fix associated races Brian Foster
2012-06-20 8:05 ` Christoph Hellwig
2012-06-20 15:35 ` Brian Foster
2012-06-20 15:59 ` Brian Foster [this message]
2012-06-20 22:35 ` Dave Chinner
2012-06-21 7:11 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FE1F37E.6090706@redhat.com \
--to=bfoster@redhat.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox