[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200912040215.16690.opurdila@ixiacom.com>
Date: Fri, 4 Dec 2009 02:15:16 +0200
From: Octavian Purdila <opurdila@...acom.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: netdev@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH 3/4] llc: use a device based hash table to speed up multicast delivery
On Friday 04 December 2009 01:52:44 you wrote:
> Octavian Purdila a écrit :
> > 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
>
Thanks for the nice summary Eric !
I still have one doubt related to this: we still need locking for creating and
destroying sockets to insert/remove them into/from the hash, RCU can't help us
here, right?
In that case wouldn't spinlock contention become an issue for short lived
connections? Probably not for UDP (or LLC), but for TCP I certainly can think
of a few usecases for short lived connections.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists