On Tue, Dec 19, 2000 at 01:27:42PM +0100, Andrea Arcangeli wrote:
> On Wed, Dec 20, 2000 at 12:56:31AM +1300, Godfrey Livingstone wrote:
> > The raid 0.9 does readbalancing but Mika's patch refines reads further.
> 
> interesting patch. Basically it takes into account the last position of each
> disk before choosing which disk to read from. But I've some remark that I'd
> like to see somehow addressed before inclusion:
> 
> 1) it doesn't take into account seeks generated by writes so
>    it seems to me it could take the worst decision sometime

Correct, but you read more often than you write, and even if not, then
just a few reads in a row will benefit.  Trust me, this works and it's
a huge improvement.

After a write, all disks will have their heads positioned at the same
place, so it doesn't matter which disk you pick.

> 2) it thinks backwards seeks are as expensive as forward seeks

But instead of *guaranteeing* that we will never get single-disk performance
(as the stock read balancing does), it optimizes seeks *somewhat*.  And really,
it *is* an improvement   ;)

You know more about this stuff than most, I'm sure. Do you think that
such heuristic could be added without being vendor/model/moonphase specific ?

> 3) this fast path check is wrong, if the check returns true it means
>    the disk will do a seek backwards while there could be another disk
>    that could read the block without any seek
> 
> +     if( this_sector == conf->mirrors[new_disk].current_position )
> +             goto rb_out;

What ?  No, you're wrong.  .current_position is where the head is at,
and if that equals the beginning of the read, the check is true and
there is really no need to look at other disks, and the new_disk will
not have to seek.  I don't know where you got that from   :)

And even if you were right, isn't it fair to assume that a disk would
have cached the previous read blocks so that a small seek backwards would
be zero-cost ?   (but nevermind that - the check above is correct)

-- 
................................................................
:   [EMAIL PROTECTED]   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob �stergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to