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>
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user