On Tue, Feb 20, 2007 at 12:09:51PM +0100, Eric Dumazet ([EMAIL PROTECTED]) 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 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html