]> git.karo-electronics.de Git - mv-sheeva.git/commit
net: Introduce dev_get_by_name_rcu()
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 30 Oct 2009 07:11:27 +0000 (07:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Nov 2009 07:55:08 +0000 (23:55 -0800)
commit72c9528bab94cc052d00ce241b8e85f5d71e45f0
treefcec7a40e0242e659474a4d9f501d9213225aa55
parent68d8287ce1e1da3c99881385a93e74f68c454fc2
net: Introduce dev_get_by_name_rcu()

Some workloads hit dev_base_lock rwlock pretty hard.
We can use RCU lookups to avoid touching this rwlock
(and avoid touching netdevice refcount)

netdevices are already freed after a RCU grace period, so this patch
adds no penalty at device dismantle time.

However, it adds a synchronize_rcu() call in dev_change_name()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c