Both the sawtooth and the "bug" are actually intentional. I don't guarantee
that they are _good_, but the idea is that we want to avoid starvation, and
the current IO request ordering should be fairer wrt latency than a elevator.
Also, there is another reason for saw-tooth as opposed to real elevator:
many harddisks will do pre-fetching, and perform much better if we always
read starting from low sectors to high.
If you _really_ want to improve performance, you should probably not use an
elevator. Instead, you should use something like "saw-tooth with a window",
where the "window" part is that the ordering algorithm will actually accept a
"backwards" request if it is within an acceptance window (of say 5% of the
disk or something like that). That can help a lot due to drive caching
(generally track caches).
(Kernel compile times are probably not good indications of disk ordering
performance, at least not if you have enough memory. I see 90% CPU use for
them most of the time).
Linus