]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fib_trie: Drop unnecessary calls to leaf_pull_suffix
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Mon, 27 Jul 2015 20:08:06 +0000 (13:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:26:24 +0000 (19:26 +0200)
commitd1f56d1041b423c2c9c767b03eaade32f5463efc
tree21cadc4b2e39448063adaac3c085fa16319a8f38
parentf75d70aa248dad6038eb5b49b5b816ce96e8ae7e
fib_trie: Drop unnecessary calls to leaf_pull_suffix

[ Upstream commit 1513069edcf8dd86cfd8d5daef482b97d6b93df6 ]

It was reported that update_suffix was taking a long time on systems where
a large number of leaves were attached to a single node.  As it turns out
fib_table_flush was calling update_suffix for each leaf that didn't have all
of the aliases stripped from it.  As a result, on this large node removing
one leaf would result in us calling update_suffix for every other leaf on
the node.

The fix is to just remove the calls to leaf_pull_suffix since they are
redundant as we already have a call in resize that will go through and
update the suffix length for the node before we exit out of
fib_table_flush or fib_table_flush_external.

Reported-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Tested-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/fib_trie.c