]> 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)
commit108535cf1b620b1d78a1024bfcd3b16d34f86126
treeabef72d0cdcb8e0701e6b97c9b3481ca01cd4566
parentfb87af1026d1cd83183529ec8847983149364eec
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