From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: netdev@vger.kernel.org
Cc: ja@ssi.bg, davem@davemloft.net
Subject: [net-next PATCH 0/4] fib_trie: Remove leaf_info structure
Date: Wed, 25 Feb 2015 11:05:55 -0800 [thread overview]
Message-ID: <20150225185658.1747.99188.stgit@ahduyck-vm-fedora20> (raw)
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.
---
Alexander Duyck (4):
fib_trie: Convert fib_alias to hlist from list
fib_trie: Replace plen with slen in leaf_info
fib_trie: Add slen to fib alias
fib_trie: Remove leaf_info
include/net/ip_fib.h | 2
net/ipv4/fib_lookup.h | 3
net/ipv4/fib_semantics.c | 4
net/ipv4/fib_trie.c | 489 ++++++++++++++++------------------------------
4 files changed, 176 insertions(+), 322 deletions(-)
--
next reply other threads:[~2015-02-25 19:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 19:05 Alexander Duyck [this message]
2015-02-25 19:06 ` [net-next PATCH 1/4] fib_trie: Convert fib_alias to hlist from list Alexander Duyck
2015-02-25 19:06 ` [net-next PATCH 2/4] fib_trie: Replace plen with slen in leaf_info Alexander Duyck
2015-02-25 21:15 ` Julian Anastasov
2015-02-25 21:30 ` Alexander Duyck
2015-02-25 22:43 ` Julian Anastasov
2015-02-25 22:57 ` Alexander Duyck
2015-02-25 19:06 ` [net-next PATCH 3/4] fib_trie: Add slen to fib alias Alexander Duyck
2015-02-25 19:06 ` [net-next PATCH 4/4] fib_trie: Remove leaf_info Alexander Duyck
2015-02-25 22:29 ` Julian Anastasov
2015-02-25 23:09 ` Alexander Duyck
2015-02-26 0:06 ` Julian Anastasov
2015-02-26 0:16 ` Alexander Duyck
2015-02-27 22:06 ` [net-next PATCH 0/4] fib_trie: Remove leaf_info structure David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150225185658.1747.99188.stgit@ahduyck-vm-fedora20 \
--to=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=ja@ssi.bg \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox