]> err.no Git - linux-2.6/commit
[TCP] tcp_cubic: faster cube root
authorStephen Hemminger <shemminger@linux-foundation.org>
Mon, 26 Mar 2007 03:21:15 +0000 (20:21 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:23:47 +0000 (22:23 -0700)
commitc5f5877c043ca471c3a607fa2c864848b19bc49a
treeb28d6cf22a0fc96f86a5c07a1b64cd8a2d3c7668
parent8570419fb7be0af84085ac8f13307392a748482c
[TCP] tcp_cubic: faster cube root

The Newton-Raphson method is quadratically convergent so
only a small fixed number of steps are necessary.
Therefore it is faster to unroll the loop. Since div64_64 is no longer
inline it won't cause code explosion.

Also fixes a bug that can occur if x^2 was bigger than 32 bits.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_cubic.c