diff options
author | Alexander Duyck <alexander.h.duyck@redhat.com> | 2014-12-31 18:57:02 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-31 23:25:55 (GMT) |
commit | 21d1f11db0e2f20a549ad8322879507850544670 (patch) | |
tree | b8e624c9b2d1426f74d39090e982037daabb2d2f /net/core | |
parent | 12c081a5c82ef64a90906247cecfa5422962e387 (diff) | |
download | linux-21d1f11db0e2f20a549ad8322879507850544670.tar.xz |
fib_trie: Remove checks for index >= tnode_child_length from tnode_get_child
For some reason the compiler doesn't seem to understand that when we are in
a loop that runs from tnode_child_length - 1 to 0 we don't expect the value
of tn->bits to change. As such every call to tnode_get_child was rerunning
tnode_chile_length which ended up consuming quite a bit of space in the
resultant assembly code.
I have gone though and verified that in all cases where tnode_get_child
is used we are either winding though a fixed loop from tnode_child_length -
1 to 0, or are in a fastpath case where we are verifying the value by
either checking for any remaining bits after shifting index by bits and
testing for leaf, or by using tnode_child_length.
size net/ipv4/fib_trie.o
Before:
text data bss dec hex filename
15506 376 8 15890 3e12 net/ipv4/fib_trie.o
After:
text data bss dec hex filename
14827 376 8 15211 3b6b net/ipv4/fib_trie.o
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions