Re: [PATCH] md: raid0: Replace hash table lookup by looping over all strip_zones.

Andre Noll
2009-05-15T17:30:40Z

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

On 18:51, raz ben yehuda wrote:

> > and as we aren't using ->sectors in this loop any more, I think it
> > can be discarded completely, just making struct strip_zone 20% smaller
> > and improving cache performance.
> >
> > What do you think?
> hamm.. please do not do it now. I think i need it for the reshape
> because I have to traverse each zone up to its end.

Well, you can always get the zone size of zone #i by

z[i].zone_end - z[i - 1].zone_end

(with z[-1].zone_end := 0). Since reshape is a slow operation anyway,
the additional subtraction won't hurt, and we'd have the smaller
cache footprint during normal operation. So I'd be inclined to kill
->sectors as well.

Andre
--
The only person who always got his work done by Friday was Robinson Crusoe

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]