Subject: Re: [PATCH 3/4] llc: use a device based hash table to speed up multicast delivery

From: Eric Dumazet <[email-masked]>
Date: Fri, 04 Dec 2009 00:52:44 +0100

Octavian Purdila a écrit :
> 
> Yes, that is probably not appropriate for upstream. What would be a good 
> value?
> 

A small one to begin (say 64).

> Since at this point we are using UP ports contention is not really an issue 
> for us. I've extrapolated this (lock per hash bucket) based on how locking is 
> done in other places, like UDP. 

Yes but you know we want to remove those locks per UDP hash bucket, since we dont
really need them anymore. ;)

If you remember, we had in the past one rwlock for the whole UDP table.

Then this was converted to one spinlock per hash slot (128 slots) + RCU lookups for unicast RX

Then we dynamically sized udp table at boot (up to 65536 slots)

multicast optimization (holding lock for small duration + double hashing)

bind optimization (thanks to double hashing)

To be done :

1) multicast RX can be done without taking any lock, and RCU lookups
2) zap all locks and use one lock, or a small array of hashed spinlocks