[lkml]   [2000]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Fix disk statistic reporting to include all disks
On Wed, Aug 30 2000, Bill Wilson wrote:
> Won't we loose some important info by not looking at minors? hda and
> hdb are minors of IDE0_MAJOR, etc. Is this data distinguishable in the
> queues?

hda and hdb each have their own queue, so we don't loose anything

> > No big deal, for now I just have the proc code doing blk_get_queue for
> > every major. That code is hardly performance critical ;-)
> True for the kernel, but there are some user land apps that read /proc/stat
> quite frequently (10 per second) so some performance tuning might be
> worth it. There could be a linked list field in the blk_dev[] array
> which links all entries that have had statistics collected. Then the /proc
> code does not have to blk_get_queue on every major.

Right now the code in my tree looks something like this:

for (i = 0; i < MAX_BLKDEV; i++) {
request_queue_t *q = blk_get_queue(MKDEV(i, 0));
if (!q)
if (!active)

/* print stats */

So it's not really that bad. I suppose things could be made quicker
by just browsing a list of active queues, but I'm not sure it's worth
the trouble (but hey, proove me wrong). Note that linking blk_dev
does not make much sense, since not all queues are available from
there. Drivers are free to use their own queue, even several if they

* Jens Axboe <>
* SuSE Labs
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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