On 01/12/16 12:27, Alexander Duyck wrote:
It has been reported that update_suffix can be expensive when it is called
on a large node in which most of the suffix lengths are the same. The time
required to add 200K entries had increased from around 3 seconds to almost
49 seconds.
In order to address this we need to move the code for updating the suffix
out of resize and instead just have it handled in the cases where we are
pushing a node that increases the suffix length, or will decrease the
suffix length.
Fixes: 5405afd1a306 ("fib_trie: Add tracking value for suffix length")
Reported-by: Robert Shearman <rshea...@brocade.com>
Signed-off-by: Alexander Duyck <alexander.h.du...@intel.com>
$ time sudo ip route restore < ~/allroutes
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
real 0m4.026s
user 0m0.156s
sys 0m2.500s
$ time sudo ip route flush via 110.110.110.2
real 0m5.423s
user 0m0.064s
sys 0m1.096s
This reduces the time taken to both add and delete the 200k routes back
down to levels comparable before commit 5405afd1a306. The changes look
good to me too. Nicely done Alex!
Reviewed-by: Robert Shearman <rshea...@brocade.com>
Tested-by: Robert Shearman <rshea...@brocade.com>
Thanks,
Rob