]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit7289e6ddb633aaee6ccea2bd2e410654c47b29a6
treeabef72d0cdcb8e0701e6b97c9b3481ca01cd4566
parent3a65f63ff6780d35aec355b440eb39bbfbe1b8f5
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