lkml.org 
[lkml]   [2004]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectNegative "ios_in_flight" in the 2.4 kernel
From
Date
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.601 / U:1.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site