[1522] in linux-scsi channel archive
Re: elevator sorting for the scsi subsystem.
daemon@ATHENA.MIT.EDU (Dario_Ballabio@milano.europe.dg.co)
Thu Mar 6 14:59:18 1997
Date: Mon, 3 Mar 1997 10:18:55 +0100
From: Dario_Ballabio@milano.europe.dg.com
To: linux-scsi@vger.rutgers.edu, groudier@club-internet.fr
This discussion raised several interesting points:
1) we have to understand how and why the kernel queues to a scsi devices
batches of commands where there is at least a write request and there
are overlapping requests inside the batch;
2) the "sawtooth" in ll_rw_blk doubles the average seek distance
compared to an equivalent elevator sorting implementation;
3) if Q is the device queue depth, any kernel optimization totally
relies on the tagging feature whenever the number of outstanding
requests is non greater than Q.
1) Might or might not be a bug, it needs to be understood better. It
is a rare event, if sometimes it would show up here and there in
the world and it would cause a disk corruption, we would surely
call it an "unlikely transient hardware error" (I'm thinking about
"intelligent" disk controllers and buggy tag implementations on
the drives).
2) There is space for future improvements.
3) This point can be defined by a suitable benchmark. I know exactely
what a software implementation of the elevator sorting can provide.
I'm doing random reads, 512 bytes each, over 960000 sectors. The
unsorted average seek distance is 320000 sectors. If the device
queue depth is 15 and there are 15 processes doing the above work,
the elevator sorted average seek distance is 67000 sectors. The
gain in term of seek reduction is 5:1. In this condition no sort
is performed by ll_rw_blk. I would like to see results of the
above benchmark using SIMPLE QUEUE TAGS first and ORDERED QUEUE
TAGS next for all the operations. This allows us to evaluate out
of any discussion the benefits of the current implementation
where all the optimization is left to the scsi drive.
Anybody willing to perform such a benchmark and let us know the
results?
db