All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: "M. Edward Borasky" <znmeb@cesmail.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Negative "ios_in_flight" in the 2.4 kernel
Date: Wed, 22 Dec 2004 12:16:43 +0100	[thread overview]
Message-ID: <20041222111642.GD12463@suse.de> (raw)
In-Reply-To: <1103691937.23157.14.camel@DreamGate>

On Tue, Dec 21 2004, M. Edward Borasky wrote:
> I've been looking at some "iostat" data from a 2.4.26 machine. The
> device utilizations are 100 percent, even when the disk is idle, which
> is mathematically impossible. By doing some digging, I discovered this
> is a kernel bug, caused by "hd->ios_in_flight" going negative. The
> relevant code appears to my untrained eyes to be in
> drivers/block/ll_rw_blk.c, specifically
> 
> 
> static inline void down_ios(struct hd_struct *hd)
> {
>         disk_round_stats(hd);
>         --hd->ios_in_flight;
> }
> 
> static inline void up_ios(struct hd_struct *hd)
> {
>         disk_round_stats(hd);
>         ++hd->ios_in_flight;
> }
> 
> Question: wouldn't a simple refusal to decrement ios_in_flight in
> "down_ios" if it's zero fix this, or am I missing something?

That would paper over the real bug, but it will work for you.

-- 
Jens Axboe


  reply	other threads:[~2004-12-22 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-22  5:05 Negative "ios_in_flight" in the 2.4 kernel M. Edward Borasky
2004-12-22 11:16 ` Jens Axboe [this message]
2004-12-22 15:19   ` M. Edward Borasky
2004-12-22 15:58     ` Marcelo Tosatti
2004-12-23  8:08       ` Jens Axboe
2004-12-23 15:30         ` M. Edward Borasky

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=20041222111642.GD12463@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=znmeb@cesmail.net \
    /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.