From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/9] xfs: Pull EFI/EFD handling out from under the AIL lock
Date: Mon, 20 Dec 2010 12:00:10 +1100 [thread overview]
Message-ID: <20101220010010.GI5193@dastard> (raw)
In-Reply-To: <20101217112254.GB12965@infradead.org>
On Fri, Dec 17, 2010 at 06:22:54AM -0500, Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Some minor comments below:
>
> > +STATIC void
> > +__xfs_efi_release(
> > + struct xfs_efi_log_item *efip)
> > +{
> > + struct xfs_ail *ailp = efip->efi_item.li_ailp;
> > +
> > + if (!test_and_clear_bit(XFS_EFI_COMMITTED, &efip->efi_flags)) {
> > + spin_lock(&ailp->xa_lock);
> > + /* xfs_trans_ail_delete() drops the AIL lock. */
> > + xfs_trans_ail_delete(ailp, (xfs_log_item_t *)efip);
>
> The second argument should be &efip->efi_item to preserve ty;e safety.
>
> > void
> > xfs_efi_release(xfs_efi_log_item_t *efip,
> > uint nextents)
> > {
> > + ASSERT(atomic_read(&efip->efi_next_extent) >= nextents);
> > + if (!atomic_sub_and_test(nextents, &efip->efi_next_extent))
> > + return;
> >
> > + __xfs_efi_release(efip);
>
> Why not just:
>
> if (atomic_sub_and_test(nextents, &efip->efi_next_extent))
> __xfs_efi_release(efip);
>
> ?
Good idea. Fixed up.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-12-20 0:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-13 4:32 xfs: AIL lock contention reduction V3 Dave Chinner
2010-12-13 4:32 ` [PATCH 1/9] xfs: fix EFI transaction cancellation Dave Chinner
2010-12-17 11:18 ` Christoph Hellwig
2010-12-13 4:32 ` [PATCH 2/9] xfs: Pull EFI/EFD handling out from under the AIL lock Dave Chinner
2010-12-17 11:22 ` Christoph Hellwig
2010-12-20 1:00 ` Dave Chinner [this message]
2010-12-13 4:32 ` [PATCH 3/9] xfs: clean up xfs_ail_delete() Dave Chinner
2010-12-13 4:32 ` [PATCH 4/9] xfs: bulk AIL insertion during transaction commit Dave Chinner
2010-12-17 11:25 ` Christoph Hellwig
2010-12-13 4:32 ` [PATCH 5/9] xfs: reduce the number of AIL push wakeups Dave Chinner
2010-12-16 15:38 ` Christoph Hellwig
2010-12-16 21:50 ` Dave Chinner
2010-12-17 0:23 ` Christoph Hellwig
2010-12-13 4:32 ` [PATCH 6/9] xfs: consume iodone callback items on buffers as they are processed Dave Chinner
2010-12-13 4:32 ` [PATCH 7/9] xfs: remove all the inodes on a buffer from the AIL in bulk Dave Chinner
2010-12-17 11:25 ` Christoph Hellwig
2010-12-13 4:32 ` [PATCH 9/9] xfs: use AIL bulk delete function to implement single delete Dave Chinner
2010-12-17 14:16 ` 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=20101220010010.GI5193@dastard \
--to=david@fromorbit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.