[Codel] [PATCH net-next] codel: use Newton method instead of sqrt() and divides
David Miller
davem at davemloft.net
Sat May 12 17:52:17 EDT 2012
From: Eric Dumazet <eric.dumazet at gmail.com>
Date: Sat, 12 May 2012 23:48:44 +0200
> On Sat, 2012-05-12 at 16:45 -0400, David Miller wrote:
>> Using a u16 would also work for me.
>
> I tried it but it gives noticeable errors for count > 16000, and no
> speed gain.
...
> And if a flow is really agressive, count can grow above 10^6
>
>> > By the way, gcc on x86 generates nice "and 0xfffffffe,%eax" instruction
>> > for (vars->rec_inv_sqrt << 1).
>>
>> Yeah but what do stores of ->rec_inv_sqrt look like?
>
> The load is "shr %edi" as in :
> and the store an "or %ecx,%esi"
Ok, fair enough.
More information about the Codel
mailing list