From: Eric Dumazet Date: Fri, 9 Feb 2007 23:44:52 +0000 (-0800) Subject: [UDP]: UDP can use sk_hash to speedup lookups X-Git-Tag: v2.6.21-rc1~274^2~233^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95f30b336b944e3e418f825044b4793d9e9aac09;p=pandora-kernel.git [UDP]: UDP can use sk_hash to speedup lookups In a prior patch, I introduced a sk_hash field (__sk_common.skc_hash) to let tcp lookups use one cache line per unmatched entry instead of two. We can also use sk_hash to speedup UDP part as well. We store in sk_hash the hnum value, and use sk->sk_hash (same cache line than 'next' pointer), instead of inet->num (different cache line) Note : We still have a false sharing problem for SMP machines, because sock_hold(sock) dirties the cache line containing the 'next' pointer. Not counting the udp_hash_lock rwlock. (did someone mentioned RCU ? :) ) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed