Re: elevator algorithm bug in ll_rw_blk.c

Peter Svensson (petersv@psv.nu)
Tue, 17 Nov 1998 12:43:19 +0100 (CET)


On 16 Nov 1998, Kai Henningsen wrote:

> (You can also see it by recognizing that the two-way scan is actually two
> one-way scans, with opposite directions, interleaved with each other.
> Every half is fair, they are equal, so combining the two *cannot* become
> unfair. Not even if Linus claims it.)

This is only true if you ignore the dynamics of the problem. Two fair
algorithms will not necesarrily be fair if combined. Since both pick their
requests from the same pool they _will_ interact.

There is a much smaller probability for a request to come in between an up
and a down scan near the edge than it is for the middle. The first pass
near the edge will, in effect, eat all the requests leaving the return
path unable to serve any requests since none exist.

Peter

--
Peter Svensson      ! Pgp key available by finger, fingerprint:
<petersv@psv.nu>    ! 8A E9 20 98 C1 FF 43 E3  07 FD B9 0A 80 72 70 AF
<petersv@df.lth.se> !
------------------------------------------------------------------------
Remember, Luke, your source will be with you... always...

- 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/