[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1336855256.31653.1329.camel@edumazet-glaptop>
Date: Sat, 12 May 2012 22:40:56 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: dave.taht@...ferbloat.net, netdev@...r.kernel.org,
nichols@...lere.com, van@...lere.net, codel@...ts.bufferbloat.net,
ycheng@...gle.com, mattmathis@...gle.com, therbert@...gle.com,
shemminger@...tta.com, nanditad@...gle.com
Subject: Re: [PATCH net-next] codel: use Newton method instead of sqrt()
and divides
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists