]> git.baikalelectronics.ru Git - kernel.git/commit
fib_trie: Only resize tnodes once instead of on each leaf removal in fib_table_flush
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Wed, 4 Mar 2015 22:58:19 +0000 (14:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Mar 2015 04:35:17 +0000 (23:35 -0500)
commite533c9f69a791d92ef976ae77073e69205180276
treeabef72d0cdcb8e0701e6b97c9b3481ca01cd4566
parent5fa32a80c6acb06643b1341bed2c543fc17bbbf3
fib_trie: Only resize tnodes once instead of on each leaf removal in fib_table_flush

This change makes it so that we only call resize on the tnodes, instead of
from each of the leaves.  By doing this we can significantly reduce the
amount of time spent resizing as we can update all of the leaves in the
tnode first before we make any determinations about resizing.  As a result
we can simply free the tnode in the case that all of the leaves from a
given tnode are flushed instead of resizing with each leaf removed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_trie.c