aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/af_rds.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2010-05-11 18:09:45 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:15:08 -0400
commit38a4e5e61344490f18241333d7b1b368a3a38748 (patch)
tree60268171e32aff9938334806d0debd5c35b3dc56 /net/rds/af_rds.c
parente4c52c98e04937ea87b0979a81354d0040d284f9 (diff)
rds: Use RCU for the bind lookup searches
The RDS bind lookups are somewhat expensive in terms of CPU time and locking overhead. This commit changes them into a faster RCU based hash tree instead of the rbtrees they were using before. On large NUMA systems it is a significant improvement. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'net/rds/af_rds.c')
-rw-r--r--net/rds/af_rds.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
index ef09340cf7a9..f16d2a92cb89 100644
--- a/net/rds/af_rds.c
+++ b/net/rds/af_rds.c
@@ -72,7 +72,15 @@ static int rds_release(struct socket *sock)
72 * with the socket. */ 72 * with the socket. */
73 rds_clear_recv_queue(rs); 73 rds_clear_recv_queue(rs);
74 rds_cong_remove_socket(rs); 74 rds_cong_remove_socket(rs);
75
76 /*
77 * the binding lookup hash uses rcu, we need to
78 * make sure we sychronize_rcu before we free our
79 * entry
80 */
75 rds_remove_bound(rs); 81 rds_remove_bound(rs);
82 synchronize_rcu();
83
76 rds_send_drop_to(rs, NULL); 84 rds_send_drop_to(rs, NULL);
77 rds_rdma_drop_keys(rs); 85 rds_rdma_drop_keys(rs);
78 rds_notify_queue_get(rs, NULL); 86 rds_notify_queue_get(rs, NULL);