Re: elevator algorithm bug in ll_rw_blk.c

Tim Smith (tzs@tzs.net)
Tue, 17 Nov 1998 01:54:58 -0800 (PST)


On Mon, 16 Nov 1998, Jeremy Fitzhardinge wrote:
> depending on the cylinder. Even knowing the precise physical geometry
> of the disk layout doesn't help unless you know the dynamic properties
> of the drive too (spindle RPM, head switch time, seek time over various
> distances, head settle time, number of arms, etc). And of course,

These can all be measured. Spindle RPM, for example, is absurdly easy
to measure. Pick a sector and read it. Note the time. Pick a bunch
of random other sectors and read them (pick enough to flush the first
one out of the drive's cache). Read the first one again, and note the
time. Subtract the two times. Repeat this several times. You'll find
that the time differences are quantized, and that quantum is the time
of one rotation.

See http://www.ece.cmu.edu/~ganger/papers/ for a couple of papers that
go into detail on how to measure all those things you mention. They also
have links there, I believe, to a disk simulator that can be given all
those measurements and then very accurately simulate the time taken for
any I/O sequence you care to give it. People who want to investigate
different disk sorting algorithms might find this very useful.

Note: I'm not saying Linux should measure this stuff and use it. I'm
just pointing out that the information is available, so if someone wants
to investigate fancy disk sorting algorithms that take advantage of
intimate knowledge of the disk, they shouldn't be discouraged by the
fact that modern disks lie about geometry and use variable density and
things like that.

Note 2: one interesting test one can do to get an idea of whether or not
fancy sorting algorithms will help is to pick short I/O sequences that are
similar to the kinds of sequences you really see, and try doing them in all
possible combinations, taking care to flush out the drive's cache between
sequences. This could at least give an idea of whether or not anything
more complicated than simple block sorting is even worth considering.

--Tim Smith

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