On 08:12, Neil Brown wrote: > On reflection, I am not convinced that the hash really does add value. > You cannot have more entries in the list than there are drives, and > you usually have much fewer. Given that consecutive entries in the > list are likely to be in the same cache line, and the hash_table is in > a totally different page, probing 3 or 4 locations in the list is > probably faster than doing a lookup in the hash table. And as we > would be able to get rid of that sector_div, we would probably get > even more saving. Yup, that's exactly what I was thinking when I looked at the code. > The only cost would be if someone had a raid0 with lots of devices all > of very different sizes. I suspect that case does not need to be > optimised for. So I would probably be happy to accept a patch which > removed that hash table. I'll see if I can come up with a patch that gets rid of the hash table and that one sector_div. Killing all instances of sector_div in raid0, while possible and probably desirable, would be more involved though. Thanks Andre -- The only person who always got his work done by Friday was Robinson Crusoe
Attachment:
signature.asc
Description: Digital signature