]> git.proxmox.com Git - mirror_ubuntu-disco-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)
commita52ca62c4a6771028da9c1de934cdbcd93d54bb4
treead093923aaace74a845880a5707e997a4aa64647
parent1a239173cccff726b60ac6a9c79ae4a1e26cfa49
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: 5405afd1a306 ("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