Subject: Re: [RFC] [PATCH] udp: optimize lookup of UDP sockets to by including destination address in the hash key

From: Eric Dumazet <[email-masked]>
Date: Thu, 05 Nov 2009 14:02:17 +0100

Andi Kleen a écrit :
> Eric Dumazet <[email-masked]> writes:
>> I have struct reorderings in progress to reduce number of cache lines read
>> per socket from two to one. So this would reduce by 50% time to find
>> a particular socket in the chain.
> 
> Assuming that each access takes equal time seems like a rather dubious
> assumption. Consider caches.

Yes, and it depends on SMP affinities too.

I assume cache is cold or even on other cpu (worst case), dealing with
100.000+ sockets or so...

If workload fits in one CPU cache/registers, we dont mind taking one
or two cache lines per object, obviously.