Subject: Re: [PATCH net-next-2.6] net: Introduce dev_get_by_index_rcu()

From: Stephen Hemminger <[email-masked]>
Date: Tue, 20 Oct 2009 14:06:32 +0900

On Tue, 20 Oct 2009 07:03:44 +0200
Eric Dumazet <[email-masked]> wrote:

> David Miller a écrit :
> > From: Eric Dumazet <[email-masked]>
> > Date: Tue, 20 Oct 2009 06:23:54 +0200
> > 
> >> I wonder if the whole thing could use RCU somehow, since some
> >> workloads hit this dev_base_lock rwlock pretty hard...
> > 
> > True, but for now we'll put your fix in :-)
> 
> [PATCH net-next-2.6] net: Introduce dev_get_by_index_rcu()
> 
> Some workloads hit dev_base_lock rwlock pretty hard.
> We can use RCU lookups to avoid touching this rwlock.
> 
> netdevices are already freed after a RCU grace period, so this patch
> adds no penalty at device dismantle time.
> 
> Signed-off-by: Eric Dumazet <[email-masked]>

All usage dev_base_lock should be replaceable by using combination of rtnl_mutex
and RCU?