From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 6/6] xfs: push the AIL from memory reclaim and periodic sync
Date: Thu, 10 Mar 2011 16:31:44 -0500 [thread overview]
Message-ID: <20110310213144.GA9371@infradead.org> (raw)
In-Reply-To: <1299715529-11026-7-git-send-email-david@fromorbit.com>
> -STATIC void xfs_ail_splice(struct xfs_ail *, struct list_head *, xfs_lsn_t);
> -STATIC void xfs_ail_delete(struct xfs_ail *, xfs_log_item_t *);
> -STATIC xfs_log_item_t * xfs_ail_min(struct xfs_ail *);
> -STATIC xfs_log_item_t * xfs_ail_next(struct xfs_ail *, xfs_log_item_t *);
> -
Reordering and cleanup of unrelated existing functions should be in a
separate patch.
> @@ -55,16 +93,32 @@ xfs_lsn_t
> xfs_trans_ail_tail(
> struct xfs_ail *ailp)
> {
> - xfs_lsn_t lsn;
> + xfs_lsn_t lsn = 0;
> xfs_log_item_t *lip;
>
> spin_lock(&ailp->xa_lock);
> lip = xfs_ail_min(ailp);
> - if (lip == NULL) {
> - lsn = (xfs_lsn_t)0;
> - } else {
> + if (lip)
> + lsn = lip->li_lsn;
> + spin_unlock(&ailp->xa_lock);
> +
> + return lsn;
> +}
> +
> +/*
> + * Return the maximum lsn held in the AIL, or zero if the AIl is empty.
> + */
> +static xfs_lsn_t
> +xfs_ail_max_lsn(
> + struct xfs_ail *ailp)
> +{
> + xfs_lsn_t lsn = 0;
> + xfs_log_item_t *lip;
> +
> + spin_lock(&ailp->xa_lock);
> + lip = xfs_ail_max(ailp);
> + if (lip)
As this is the counterpart to xfs_trans_ail_tail the naming for both
should be similar. I much prefer the descriptive _lsn naming over the
random trans in xfs_trans_ail_tail.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-03-10 21:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 0:05 [PATCH 0/6] xfs: Reduce OOM kill problems under heavy load V2 Dave Chinner
2011-03-10 0:05 ` [PATCH 1/6] xfs: introduce inode cluster buffer trylocks for xfs_iflush Dave Chinner
2011-03-10 17:31 ` Christoph Hellwig
2011-03-10 0:05 ` [PATCH 2/6] xfs: introduce a xfssyncd workqueue Dave Chinner
2011-03-10 17:34 ` Christoph Hellwig
2011-03-18 3:39 ` Dave Chinner
2011-03-10 0:05 ` [PATCH 3/6] xfs: convert ENOSPC inode flushing to use new syncd workqueue Dave Chinner
2011-03-10 17:35 ` Christoph Hellwig
2011-03-18 3:39 ` Dave Chinner
2011-03-10 0:05 ` [PATCH 4/6] xfs: introduce background inode reclaim work Dave Chinner
2011-03-10 17:40 ` Christoph Hellwig
2011-03-18 4:00 ` Dave Chinner
2011-03-10 0:05 ` [PATCH 5/6] xfs: convert the xfsaild threads to a workqueue Dave Chinner
2011-03-10 17:48 ` Christoph Hellwig
2011-03-18 4:06 ` Dave Chinner
2011-03-19 13:45 ` Christoph Hellwig
2011-04-03 0:38 ` Dave Chinner
2011-04-03 10:59 ` Christoph Hellwig
2011-04-04 2:11 ` Dave Chinner
2011-03-10 0:05 ` [PATCH 6/6] xfs: push the AIL from memory reclaim and periodic sync Dave Chinner
2011-03-10 21:31 ` Christoph Hellwig [this message]
2011-03-18 4:07 ` Dave Chinner
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=20110310213144.GA9371@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--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