public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 4/6] xfs: reduce the number of log forces from tail pushing
Date: Thu, 25 Aug 2011 15:57:06 -0500	[thread overview]
Message-ID: <1314305826.3136.102.camel@doink> (raw)
In-Reply-To: <1314256626-11136-5-git-send-email-david@fromorbit.com>

On Thu, 2011-08-25 at 17:17 +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> The AIL push code will issue a log force on ever single push loop
> that it exits and has encountered pinned items. It doesn't rescan
> these pinned items until it revisits the AIL from the start. Hence
> we only need to force the log once per walk from the start of the
> AIL to the target LSN.
> 
> This results in numbers like this:
> 
> 	xs_push_ail_flush.....         1456
> 	xs_log_force.........          1485
> 
> For an 8-way 50M inode create workload - almost all the log forces
> are coming from the AIL pushing code.
> 
> Reduce the number of log forces by only forcing the log if the
> previous walk found pinned buffers. This reduces the numbers to:
> 
> 	xs_push_ail_flush.....          665
> 	xs_log_force.........           682
> 
> For the same test.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

This looks good to me and if you don't update it
I can take it as-is.  A couple trivial things below
if you decide to update.

Reviewed-by: Alex Elder <aelder@sgi.com>

> ---
>  fs/xfs/xfs_trans_ail.c  |   28 ++++++++++++++++------------
>  fs/xfs/xfs_trans_priv.h |    1 +
>  2 files changed, 17 insertions(+), 12 deletions(-)
> 
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index c15aa29..dd966e0 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
> @@ -372,12 +372,24 @@ xfs_ail_worker(
>  	xfs_lsn_t		lsn;
>  	xfs_lsn_t		target;
>  	long			tout = 10;
> -	int			flush_log = 0;
>  	int			stuck = 0;
>  	int			count = 0;
>  	int			push_xfsbufd = 0;
>  
> +	/*
> +	 * If last time we ran we encountered pinned items, force the log first,
> +	 * wait for it and then push again.
          * and wait for it before we push it again.
          */

> +	 */
>  	spin_lock(&ailp->xa_lock);
> +	if (ailp->xa_last_pushed_lsn == 0 && ailp->xa_log_flush &&
> +	    !list_empty(&ailp->xa_ail)) {
> +		ailp->xa_log_flush = 0;
> +		spin_unlock(&ailp->xa_lock);
> +		XFS_STATS_INC(xs_push_ail_flush);
> +		xfs_log_force(mp, XFS_LOG_SYNC);
> +		spin_lock(&ailp->xa_lock);
> +	}

This is a definite improvement over the previous version.

> +
>  	target = ailp->xa_target;
>  	lip = xfs_trans_ail_cursor_first(ailp, &cur, ailp->xa_last_pushed_lsn);
>  	if (!lip || XFS_FORCED_SHUTDOWN(mp)) {
> @@ -391,6 +403,7 @@ xfs_ail_worker(
>  
>  	XFS_STATS_INC(xs_push_ail);
>  
> +
>  	/*
>  	 * While the item we are looking at is below the given threshold
>  	 * try to flush it out. We'd like not to stop until we've at least

Kill this hunk.

. . .


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-08-25 20:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25  7:17 [PATCH 0/6] xfs: patch queue for Linux 3.2 Dave Chinner
2011-08-25  7:17 ` [PATCH 1/6] xfs: don't serialise direct IO reads on page cache checks Dave Chinner
2011-08-25  7:17 ` [PATCH 2/6] xfs: don't serialise adjacent concurrent direct IO appending writes Dave Chinner
2011-08-25 21:08   ` Alex Elder
2011-08-26  2:19     ` Dave Chinner
2011-08-25  7:17 ` [PATCH 3/6] xfs: Don't allocate new buffers on every call to _xfs_buf_find Dave Chinner
2011-08-25 20:56   ` Alex Elder
2011-08-25 23:57     ` Dave Chinner
2011-08-25  7:17 ` [PATCH 4/6] xfs: reduce the number of log forces from tail pushing Dave Chinner
2011-08-25 20:57   ` Alex Elder [this message]
2011-08-25 23:47     ` Dave Chinner
2011-08-25  7:17 ` [PATCH 5/6] xfs: re-arrange all the xfsbufd delwri queue code Dave Chinner
2011-08-25 20:57   ` Alex Elder
2011-08-25  7:17 ` [PATCH 6/6] xfs: convert xfsbufd to use a workqueue Dave Chinner
2011-08-25 20:57   ` Alex Elder
2011-08-25 23:46     ` Dave Chinner
2011-08-26  0:18       ` 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=1314305826.3136.102.camel@doink \
    --to=aelder@sgi.com \
    --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