lkml.org 
[lkml]   [2002]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Re: Disk IO statistics still buggy
Hi!

On Sat, Jul 06, 2002 at 07:42:42AM -0600, Thunder from the hill wrote:
> On Sat, Jul 06, 2002 at 12:15:47AM -0400, Bill Davidsen wrote:
> > > Marcelos' BK repository (that will become 2.4.19-rc2) includes a patch to
> > > remove these statistics completely from /proc/partitions...
> >
> > Is this the new Linux way of life? Removing modules is hard, GET RID OF
> > THE FEATURE! Stats in /proc/partitions are not always correct, GET RID OF
> > THE FEATURE!
>
> You misunderstood. It was nothing incorrect about the stats in
> /proc/partitions, it was just moved because it just didn't belong into
> /proc/partitions.

And it hasn't been removed either. Only the output has been removed; the
data is still collected. Meanwhile I found the bug that leads to wrong
ios_in_flight values on SCSI systems:

The accounting was done on a copy of the request _after_ the request has
been dequeued and the irq_request_lock released. I fixed this by taking
this lock again while calling the accounting function (see the patch
below).

** This patch is relevant regardless where the statistics will finally
be printed. **

One issue is still left: on my non-SCSI machine, the ios_in_flight value
is at -1 when although requests are running. It doesn't get any more
wrong than that it seems, and I'm not sure where that happened. Maybe
something went wrong when initializing this value at boot time? I have a
workaround that corrects negative ios_in_flight values to zero each time
/proc/partitions is read. After further testing I will post it to the
list.

Bye
Jochen Suckfüll

--
Jochen Suckfuell --- http://www.suckfuell.net/jochen/ ---

--- linux/drivers/scsi/scsi_lib.c Mon Jul 8 16:15:27 2002
+++ linux_work/drivers/scsi/scsi_lib.c Tue Jul 9 17:56:39 2002
@@ -426,7 +426,9 @@
if (req->waiting != NULL) {
complete(req->waiting);
}
+ spin_lock_irq(&io_request_lock);
req_finished_io(req);
+ spin_unlock_irq(&io_request_lock);
add_blkdev_randomness(MAJOR(req->rq_dev));

SDpnt = SCpnt->device;

-
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 13:27    [W:0.111 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site