N-way mirror read speedup in zfsonlinux
Steven Hartland
killing at multiplay.co.uk
Fri Aug 16 16:16:54 UTC 2013
Baring any more feedback I intend to commit this soon, so please shout
if there's anything outstanding ;-)
----- Original Message -----
From: "Steven Hartland"
> ----- Original Message -----
> From: "Matthew Ahrens" <mahrens at delphix.com>
>
>
>> The platform-independent code in the patch looks good to me with one
>> exceptions:
>>
>> mm->mm_children = c--;
>>
>> It's non-obvious why c should be decremented *here*, as opposed to as part
>> of the loop logic. If there's some trick going on with the loop then it's
>> lost on me.
>
> This just configures 'c' so the loop starts with the last child, could split
> to a c--; on its own line if people prefer?
>
>> Does it matter that we go through the children in reverse
>> order? Is there something wrong with the existing loop logic:
>>
>> for (c = 0; c < mm->mm_children; c++) {
>
> Order is not important, but using a do{} while(); provides a small optimisation
> which avoids the first loop test totally and then on subisquent iterations
> compare against a constant not through a struct pointer.
Regards
Steve
================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.
In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster at multiplay.co.uk.
More information about the zfs-devel
mailing list