Subject: Re: Extensible hashing and RCU

From: Evgeniy Polyakov <[email-masked]>
Date: Tue, 20 Feb 2007 14:29:02 +0300

On Tue, Feb 20, 2007 at 12:09:51PM +0100, Eric Dumazet ([email-masked]) wrote:
> If we want to optimize tcp, we should reorder fields to reduce number of cache 
> lines, not change algos. struct sock fields are currently placed to reduce 
> holes, while they should be grouped by related fields sharing cache lines.

Getting into account that network stack with NAPI schedules several
packets to be queued into socket and all that happens without any
infuence from userspace, trie/tree wins again in that regard that
majority of the tree will be in the cache already.

Hash table has its fast access only in theory, practice adds caches,
NAPI and a lot of other stuff. Even simple test (maybe broken, but it
is equally broken for both trie and hash, even worse for trie))
whows that hash table does not behave as good as expected and close to
trie.

I'm going back to drawing board to design simple trie algo/patch
suitable for hash table selection replacement, so that we would test it
in a real life examples.

-- 
	Evgeniy Polyakov