]> 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)
commit17be0e73afd543ab4cd8c25145cea343a2c6762a
treead093923aaace74a845880a5707e997a4aa64647
parentab51f191d6f151e7ef0fddfedd23448f8f60a448
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: de17dbe4067f ("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