[Codel] [PATCH net-next] codel: use Newton method instead of sqrt() and divides
Eric Dumazet
eric.dumazet at gmail.com
Sat May 12 16:40:56 EDT 2012
On Sat, 2012-05-12 at 15:52 -0400, David Miller wrote:
> Applied but I never like that bitfield sharing for real integers.
>
> GCC makes a complete mess of it as it extracts and inserts the
> integer value into that bit field. You are guarenteed to get
> better code if you do this by hand in a full u32.
>
> Either that or just bite the bullet and use a completely seperate
> field, maybe we'll need more boolean states later.
I couldnt use a full u32 or else fq_codel cell was > 64 bytes (or I
would have to remove the 'dropped' field)
24 bit of precision for the reciprocal value is more than enough (Van
suggested 16 bits in fact), so we have actually room for 7 bits if
needed.
By the way, gcc on x86 generates nice "and 0xfffffffe,%eax" instruction
for (vars->rec_inv_sqrt << 1).
Thanks
More information about the Codel
mailing list