public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Negative "ios_in_flight" in the 2.4 kernel
@ 2004-12-22  5:05 M. Edward Borasky
  2004-12-22 11:16 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: M. Edward Borasky @ 2004-12-22  5:05 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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?

Ed Borasky
znmeb@cesmail.net


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-12-23 15:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-22  5:05 Negative "ios_in_flight" in the 2.4 kernel M. Edward Borasky
2004-12-22 11:16 ` Jens Axboe
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox