LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [rfc] IPVS: convert scheduler management to RCU

To: Changli Gao <xiaosuo@xxxxxxxxx>
Subject: Re: [rfc] IPVS: convert scheduler management to RCU
Cc: Simon Horman <horms@xxxxxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, Stephen Hemminger <shemminger@xxxxxxxxxx>, Wensong Zhang <wensong@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Paul E McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Fri, 20 Aug 2010 16:05:50 +0200
Le vendredi 20 août 2010 à 21:44 +0800, Changli Gao a écrit :
> On Fri, Aug 20, 2010 at 9:33 PM, Simon Horman <horms@xxxxxxxxxxxx> wrote:
> > Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
> >
> > ---
> >
> > I'm still getting my head around RCU, so review would be greatly 
> > appreciated.
> >
> > It occurs to me that this code is not performance critical, so
> > perhaps simply replacing the rwlock with a spinlock would be better?
> >
> > Index: nf-next-2.6/net/netfilter/ipvs/ip_vs_sched.c


> > -       write_unlock_bh(&__ip_vs_sched_lock);
> > +       list_del_rcu(&scheduler->n_list);
> > +       spin_unlock_bh(&ip_vs_sched_mutex);
> 
> Need a rcu_barrier_bh().
> 
> >
> >        /* decrease the module use count */
> >        ip_vs_use_count_dec();


Quite frankly, if this is not performance critical, just use the
spinlock (and dont use 'mutex' in its name ;) )

Using RCU here will force at least one RCU grace period at dismantle
time...



--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>