public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: David Chinner <dgc@sgi.com>, xfs-dev <xfs-dev@sgi.com>,
	xfs-oss <xfs@oss.sgi.com>
Subject: Re: [patch] Prevent excessive xfsaild wakeups
Date: Fri, 22 Feb 2008 09:47:00 +1100	[thread overview]
Message-ID: <20080221224700.GD155407@sgi.com> (raw)
In-Reply-To: <20080220191000.GA24257@infradead.org>

On Wed, Feb 20, 2008 at 02:10:00PM -0500, Christoph Hellwig wrote:
> On Tue, Feb 19, 2008 at 09:59:06AM +1100, David Chinner wrote:
> > +	if (count && (XFS_LSN_CMP(lsn, target) >= 0)) {
> > +		/*
> > +		 * We reached the target so wait a bit longer for I/O to
> > +		 * complete and remove pushed items from the AIL before we
> > +		 * start the next scan from the start of the AIL.
> > +		 */
> >  		tout += 20;
> >  		last_pushed_lsn = 0;
> > +	} else if (!count) {
> > +		/* We're past our target or empty, so idle */
> > +		tout = 1000;
> >  	} else if ((restarts > XFS_TRANS_PUSH_AIL_RESTARTS) ||
> >  		   (count && ((stuck * 100) / count > 90))) {
> >  		/*
> 
> When looking at this conditions it confuses the hell out of me.  Having
> count checked in each of three nested conditionals simply isn't readable
> :)

Yeah, I noticed that when posting it. Got to keep you busy, Christoph. ;)

> Also some checks seem to be superflous, so how about:

Yup, fixed to be like this. I'll run it through a qa run
and go from there...

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

      reply	other threads:[~2008-02-21 22:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 22:59 [patch] Prevent excessive xfsaild wakeups David Chinner
2008-02-20  5:53 ` David Chinner
2008-02-20 14:12   ` Eric Sandeen
2008-02-20 19:10 ` Christoph Hellwig
2008-02-21 22:47   ` David Chinner [this message]

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=20080221224700.GD155407@sgi.com \
    --to=dgc@sgi.com \
    --cc=hch@infradead.org \
    --cc=xfs-dev@sgi.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