Re: [PATCH] Re: Disk IO statistics still buggy

From: Marcelo Tosatti (marcelo@conectiva.com.br)
Date: Thu Jul 11 2002 - 16:27:25 EST


Christoph,

Can you take a look at this one ?

On Tue, 9 Jul 2002, Jochen Suckfuell wrote:

> 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/



This archive was generated by hypermail 2b29 : Mon Jul 15 2002 - 22:00:21 EST