diff options
author | David S. Miller <davem@davemloft.net> | 2015-02-27 22:37:23 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-27 22:37:23 +0100 |
commit | 7eb603459caf1de4ddf36c18d7ce3ebef28dde8e (patch) | |
tree | ded89f2190deffac52d17be63a99a8920c25da18 /net/ipv4/fib_lookup.h | |
parent | Merge branch 'ip_level_multicast_join_leave' (diff) | |
parent | fib_trie: Remove leaf_info (diff) | |
download | linux-7eb603459caf1de4ddf36c18d7ce3ebef28dde8e.tar.xz linux-7eb603459caf1de4ddf36c18d7ce3ebef28dde8e.zip |
Merge branch 'fib_trie_remove_leaf_info'
Alexander Duyck says:
====================
fib_trie: Remove leaf_info structure
This patch set removes the leaf_info structure from the IPv4 fib_trie. The
general idea is that the leaf_info structure itself only held about 6
actual bits of data, beyond that it was mostly just waste. As such we can
drop the structure, move the 1 byte representing the prefix/suffix length
into the fib_alias and just link it all into one list.
My testing shows that this saves somewhere between 4 to 10ns depending on
the type of test performed. I'm suspecting that this represents 1 to 2 L1
cache misses saved per look-up.
One side effect of this change is that semantic_match_miss will now only
increment once per leaf instead of once per leaf_info miss. However the
stat is already skewed now that we perform a preliminary check on the leaf
as a part of the look-up.
I also have gone through and addressed a number of ordering issues in the
first patch since I had misread the behavior of list_add_tail.
I have since run some additional testing and verified the resulting lists
are in the same order when combining multiple prefix length and tos values
in a single leaf.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_lookup.h')
-rw-r--r-- | net/ipv4/fib_lookup.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/fib_lookup.h b/net/ipv4/fib_lookup.h index 825981b1049a..ae2e6eede46e 100644 --- a/net/ipv4/fib_lookup.h +++ b/net/ipv4/fib_lookup.h @@ -6,11 +6,12 @@ #include <net/ip_fib.h> struct fib_alias { - struct list_head fa_list; + struct hlist_node fa_list; struct fib_info *fa_info; u8 fa_tos; u8 fa_type; u8 fa_state; + u8 fa_slen; struct rcu_head rcu; }; |