[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-vlan
Subject:    Re: [VLAN] spin lock question
From:       Stephen Hemminger <shemminger () osdl ! org>
Date:       2006-10-10 21:10:44
Message-ID: 20061010141044.3f112c96 () freekitty
[Download RAW message or body]

On Tue, 10 Oct 2006 09:18:45 +0100
Alex Zeffertt <ajz@cambridgebroadband.com> wrote:

> Stephen Hemminger wrote:
> > On Mon, 9 Oct 2006 12:39:44 -0700
> > Stephen Hemminger <shemminger@osdl.org> wrote:
> > 
> >> On Fri, 06 Oct 2006 09:48:27 +0100
> >> Alex Zeffertt <ajz@cambridgebroadband.com> wrote:
> >>
> >>> Hi list,
> >>>
> >>> I've been reading through the 8021q.o module source recently and
> >>> I am confused by the choice of spin lock used in the following
> >>> code:
> >>>
> >>>
> >>> int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
> >>>                    struct packet_type* ptype)
> >>> {
> >>> 	...
> >>> 	spin_lock_bh(&vlan_group_lock);
> >>> 	skb->dev = __find_vlan_dev(dev, vid);
> >>> 	if (!skb->dev) {
> >>> 		spin_unlock_bh(&vlan_group_lock);
> >>> 	...
> >>>
> >> That code should use RCU actually.
> > 
> > That's what 2.6 already does.
> > 
> > 
> 
> Hi Stephen, thanks for your replies. I now think I understand, the key thing
> being the implicit ref counting in spin_unlock_bh.
> 
> But, for the record, what is RCU?

Read Copy Update, described in Documentation/RCU/rcu.txt in the kernel source.


-- 
Stephen Hemminger <shemminger@osdl.org>
_______________________________________________
Vlan mailing list
Vlan@candelatech.com
http://www.candelatech.com/mailman/listinfo/vlan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic