]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Drop suffix update from resize code
authorAlexander Duyck <alexander.h.duyck@intel.com>
Thu, 1 Dec 2016 12:27:57 +0000 (07:27 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2016 18:15:58 +0000 (13:15 -0500)
commitf890ebe8e18f70f10c3e34a7749daaac4b745dcf
treead093923aaace74a845880a5707e997a4aa64647
parent3dc76b334a58a8fef4c646e7cc565b77e7f693d0
ipv4: Drop suffix update from resize code

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: bea8e562f31b ("fib_trie: Add tracking value for suffix length")
Reported-by: Robert Shearman <rshearma@brocade.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Reviewed-by: Robert Shearman <rshearma@brocade.com>
Tested-by: Robert Shearman <rshearma@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c