Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 11 Jul 2002 18:18:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 11 Jul 2002 18:18:53 -0400 Received: from perninha.conectiva.com.br ([200.250.58.156]:46606 "HELO perninha.conectiva.com.br") by vger.kernel.org with SMTP id convert rfc822-to-8bit; Thu, 11 Jul 2002 18:18:53 -0400 Date: Thu, 11 Jul 2002 18:27:25 -0300 (BRT) From: Marcelo Tosatti X-X-Sender: marcelo@freak.distro.conectiva To: Jochen Suckfuell Cc: Thunder from the hill , Bill Davidsen , Andries Brouwer , Adrian Bunk , Linux Kernel , Christoph Hellwig Subject: Re: [PATCH] Re: Disk IO statistics still buggy In-Reply-To: <20020709190019.A19394@ds217-115-141-141.dedicated.hosteurope.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1806 Lines: 51 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/