Re: [PATCH] Fix disk statistic reporting to include all disks

From: Linus Torvalds (torvalds@transmeta.com)
Date: Tue Aug 29 2000 - 20:08:14 EST


On Wed, 30 Aug 2000, Jens Axboe wrote:
>
> Maybe I wasn't very clear... What I mean is that drivers that use
> blk_queue_make_request (such as md) are handed buffers directly and
> don't get requests added to their queues in the regular sense, instead
> they remap b_rdev before ll_rw_blk gets the queue for the device and
> adds them to the destination queue.

Ho humm.. I actually kind of expected the statistics to be done in
generic_make_request(), so that we'd have

        .....
                do {
                        q = blk_get_queue(bh->b_rdev);
                        if (!q) {
                                ... no such device ..
                        }
        + statistics(q, rw, bh->b_size);
                } while (q->make_request_fn(q, rw, bh)));
        ...

and just remove the drive_stat_acct() thing completely.

That way, we'd have a per-queue "this many reads, this many writes".

The /proc code would have to find all the queues, but that shouldn't be
too bad either. At least we wouldn't have the current silly disk_index()
stuff (which is all done in a timing-critical routine).

Then, as we get saner and saner queues, we'll get saner and saner
statistics automatically. The above should already be quite sane for IDE.

No?

                Linus

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



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:24 EST