[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4B2025FD.3030106@gmail.com>
Date: Wed, 09 Dec 2009 23:34:37 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Octavian Purdila <opurdila@...acom.com>
CC: netdev@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [RFC PATCH] llc: convert the socket list to RCU locking (was
Re: [PATCH 3/4] llc: use a device based hash table to speed up multicast
delivery)
Le 09/12/2009 22:49, Octavian Purdila a écrit :
> On Wednesday 09 December 2009 22:36:06 you wrote:
>
>> I think I have everything (in my head :) ) that I need now to come back
>> with a v2 llc patch set now.
>
> Hmm, not really :) I still can't see how we can do multicast delivery only with RCU when we need to restart the lookup.
>
> I think you mentioned that it is actually possible to do this for UDP, but I didn't found out how :-?
A patch is coming for this, it might need a seqlock (instead of a spinlock).
Do the list lookup and take a refcount on all matching sockets, store pointers in a 'stack'.
If lookup was sucessful, then multicast packet to all sockets present in stack.
>
> Also, I think we need to restart the lookup even when only one list is used, when we found out that the object is either free or not the one we were looking for, since the current object might have been added to the end of the
> list, thus short circuiting our search. E.g.:
>
Not necessary, because a socket is always added at front of the list.
You have a guarantee that you examined all sockets at least once.
But it doesnt matter so much anyway, because you dont want a single list :)
--
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