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: Lachlan McIlroy <lachlan@sgi.com>, David Chinner <dgc@sgi.com>,
	xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] bulkstat fixups
Date: Thu, 22 Nov 2007 08:31:11 +1100	[thread overview]
Message-ID: <20071121213110.GD114266761@sgi.com> (raw)
In-Reply-To: <20071121151747.GC8454@infradead.org>

On Wed, Nov 21, 2007 at 03:17:47PM +0000, Christoph Hellwig wrote:
> +#define XFS_BULKSTAT_UBLEFT(ubleft)	((ubleft) >= statstruct_size)
> +
> 
> 	I don't think this macro is really helpful.  An inline would
> 	have been useful if statstruct_size was constant, but this
> 	way it's much better to just write out the comparism the four
> 	times it's used.
> 
> +	if (!ubcountp || *ubcountp <= 0) {
> +		return EINVAL;
> +	}
> 
> 	No need for the braces here.
> 
> 
> I also must say I don't like the cond_resched() calls very much.  They
> look entirely random to me.  We really should only need cond_resched
> when it's absolutely needed, and it deserves a comment why it's needed
> then.

I think I mentioned that we don't need them in the innermost loop.
The reason for adding them is that if the inode clusters are in cache,
bulkstat will not yield the cpu at all and so holds off other
things from operating on that CPU. And when bulkstat has got itself
stuck in a loop, if it's running on the same CPU as I/O completion
events are running on (i.e. disk interrupts delivered to) it basically
hangs the filesystem. If that CPU is taking interrupts for your root
filesystem....

Cheers,

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

      reply	other threads:[~2007-11-21 21:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09  5:24 [PATCH] bulkstat fixups Lachlan McIlroy
2007-11-09  5:35 ` Vlad Apostolov
2007-11-11 21:48 ` David Chinner
2007-11-12  2:57   ` Lachlan McIlroy
2007-11-12  4:11     ` David Chinner
2007-11-16  4:34       ` Lachlan McIlroy
2007-11-16  4:42         ` Lachlan McIlroy
2007-11-19  3:02         ` David Chinner
2007-11-21 15:17         ` Christoph Hellwig
2007-11-21 21:31           ` 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=20071121213110.GD114266761@sgi.com \
    --to=dgc@sgi.com \
    --cc=hch@infradead.org \
    --cc=lachlan@sgi.com \
    --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