summaryrefslogtreecommitdiffstats
path: root/net/rds/ib.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2010-04-23 03:59:15 +0200
committerAndy Grover <andy.grover@oracle.com>2010-09-09 03:12:28 +0200
commit764f2dd92f5cd308d1c4372b33fea2b265c093f5 (patch)
treef979329a2b5bfb0c92fc83e951d9ac7654c4ba78 /net/rds/ib.c
parentrds: per-rm flush_wait waitq (diff)
downloadlinux-764f2dd92f5cd308d1c4372b33fea2b265c093f5.tar.xz
linux-764f2dd92f5cd308d1c4372b33fea2b265c093f5.zip
rds: rcu-ize rds_ib_get_device()
rds_ib_get_device is called very often as we turn an ip address into a corresponding device structure. It currently take a global spinlock as it walks different lists to find active devices. This commit changes the lists over to RCU, which isn't very complex because they are not updated very often at all. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'net/rds/ib.c')
-rw-r--r--net/rds/ib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 927c481b5245..7a2131d37dfb 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -137,6 +137,7 @@ void rds_ib_remove_one(struct ib_device *device)
if (!rds_ibdev)
return;
+ synchronize_rcu();
list_for_each_entry_safe(i_ipaddr, i_next, &rds_ibdev->ipaddr_list, list) {
list_del(&i_ipaddr->list);
kfree(i_ipaddr);