I did it by tracing. 4 meg printk buffer, teach printk to timestamp
its output, add tracing printk's, then stare at the output.
The patches are at
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.38/2.5.38-mm1/experimental/printk-big-buf.patch
http://www.zip.com.au/~akpm/linux/patches/2.5/2.5.38/2.5.38-mm1/experimental/elevator-debug.patch
One sample trace is at
http://www.zip.com.au/~akpm/linux/patches/trace.txt
Watch the read of sector 528598. It was inserted into the
elevator at 24989.185 seconds, was taken off the elevator by
the driver at 24989.186 seconds and was completed in bio_endio()
at 24992.273 seconds. That trace was taken with 253 tags. I
don't have a 4-tag trace handy but it was much the same, with
a two-second lag.
I am assuming that the driver submits the request to the disk
shortly after calling elv_next_request(). If I'm wrong, and
the driver itself is hanging onto the request for a significant
amount of time then the disk is not the source of the delay.
-
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/