netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexander.duyck@gmail.com
Cc: alexander.h.duyck@redhat.com, netdev@vger.kernel.org
Subject: Re: [net-next PATCH 00/17] fib_trie: Reduce time spent in fib_table_lookup by 35 to 75%
Date: Thu, 01 Jan 2015 21:08:41 -0500 (EST)	[thread overview]
Message-ID: <20150101.210841.1269406605009943743.davem@davemloft.net> (raw)
In-Reply-To: <54A4B1D4.1030506@gmail.com>

From: Alexander Duyck <alexander.duyck@gmail.com>
Date: Wed, 31 Dec 2014 18:32:52 -0800

> On 12/31/2014 03:46 PM, David Miller wrote:
>> This knocks about 35 cpu cycles off of a lookup that ends up using the
>> default route on sparc64.  From about ~438 cycles to ~403.
> 
> Did that 438 value include both fib_table_lookup and check_leaf?  Just
> curious as the overall gain seems smaller than what I have been seeing
> on the x86 system I was testing with, but then again it could just be a
> sparc64 thing.

This is just a default run of my kbench_mod.ko from the net_test_tools
repo.  You can try it as well on x86-86 or similar.

> I've started work on a second round of patches.  With any luck they
> should be ready by the time the next net-next opens.  My hope is to cut
> the look-up time by another 30 to 50%, though it will take some time as
> I have to go though and drop the leaf_info structure, and look at
> splitting the tnode in half to break the key/pos/bits and child pointer
> dependency chain which will hopefully allow for a significant reduction
> in memory read stalls.

I'm very much looking forward to this.

> I am also planning to take a look at addressing the memory waste that
> occurs on nodes larger than 256 bytes due to the way kmalloc allocates
> memory as powers of 2.  I'm thinking I might try encouraging the growth
> of smaller nodes, and discouraging anything over 256 by implementing a
> "truesize" type logic that can be used in the inflate/halve functions so
> that the memory usage is more accurately reflected.

Wouldn't this result in a deeper tree?  The whole point is to keep the
tree as shallow as possible to minimize the memory refs on a lookup
right?

  reply	other threads:[~2015-01-02  2:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-31 18:55 [net-next PATCH 00/17] fib_trie: Reduce time spent in fib_table_lookup by 35 to 75% Alexander Duyck
2014-12-31 18:55 ` [net-next PATCH 01/17] fib_trie: Update usage stats to be percpu instead of global variables Alexander Duyck
2014-12-31 18:55 ` [net-next PATCH 02/17] fib_trie: Make leaf and tnode more uniform Alexander Duyck
2014-12-31 18:55 ` [net-next PATCH 03/17] fib_trie: Merge tnode_free and leaf_free into node_free Alexander Duyck
2014-12-31 18:55 ` [net-next PATCH 04/17] fib_trie: Merge leaf into tnode Alexander Duyck
2014-12-31 18:55 ` [net-next PATCH 05/17] fib_trie: Optimize fib_table_lookup to avoid wasting time on loops/variables Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 06/17] fib_trie: Optimize fib_find_node Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 07/17] fib_trie: Optimize fib_table_insert Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 08/17] fib_trie: Update meaning of pos to represent unchecked bits Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 09/17] fib_trie: Use unsigned long for anything dealing with a shift by bits Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 10/17] fib_trie: Push rcu_read_lock/unlock to callers Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 11/17] fib_trie: Move resize to after inflate/halve Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 12/17] fib_trie: Add functions should_inflate and should_halve Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 13/17] fib_trie: Push assignment of child to parent down into inflate/halve Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 14/17] fib_trie: Push tnode flushing down to inflate/halve Alexander Duyck
2014-12-31 18:56 ` [net-next PATCH 15/17] fib_trie: inflate/halve nodes in a more RCU friendly way Alexander Duyck
2014-12-31 18:57 ` [net-next PATCH 16/17] fib_trie: Remove checks for index >= tnode_child_length from tnode_get_child Alexander Duyck
2014-12-31 18:57 ` [net-next PATCH 17/17] fib_trie: Add tracking value for suffix length Alexander Duyck
2014-12-31 23:46 ` [net-next PATCH 00/17] fib_trie: Reduce time spent in fib_table_lookup by 35 to 75% David Miller
2015-01-01  2:32   ` Alexander Duyck
2015-01-02  2:08     ` David Miller [this message]
2015-01-02 16:28       ` Alexander Duyck
2015-01-02 20:34         ` 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=20150101.210841.1269406605009943743.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexander.duyck@gmail.com \
    --cc=alexander.h.duyck@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).