diff options
author | 2012-02-03 11:09:23 -0500 | |
---|---|---|
committer | 2015-09-30 12:43:24 -0400 | |
commit | 8b0a6b461e2ccc95363e0547aa4f43ba2e02b096 (patch) | |
tree | ab5d09ccb54b090f1ecf02af7466b236a0163328 /net/rds/af_rds.c | |
parent | RDS: use kfree_rcu in rds_ib_remove_ipaddr (diff) | |
download | linux-8b0a6b461e2ccc95363e0547aa4f43ba2e02b096.tar.gz linux-8b0a6b461e2ccc95363e0547aa4f43ba2e02b096.tar.bz2 linux-8b0a6b461e2ccc95363e0547aa4f43ba2e02b096.zip |
RDS: make socket bind/release locking scheme simple and more efficient
RDS bind and release locking scheme is very inefficient. It
uses RCU for maintaining the bind hash-table which is great but
it also needs to hold spinlock for [add/remove]_bound(). So
overall usecase, the hash-table concurrent speedup doesn't pay off.
In fact blocking nature of synchronize_rcu() makes the RDS
socket shutdown too slow which hurts RDS performance since
connection shutdown and re-connect happens quite often to
maintain the RC part of the protocol.
So we make the locking scheme simpler and more efficient by
replacing spin_locks with reader/writer locks and getting rid
off rcu for bind hash-table.
In subsequent patch, we also covert the global lock with per-bucket
lock to reduce the global lock contention.
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Diffstat (limited to 'net/rds/af_rds.c')
-rw-r--r-- | net/rds/af_rds.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c index a2f28a6d4dc5..dc087666217a 100644 --- a/net/rds/af_rds.c +++ b/net/rds/af_rds.c @@ -72,13 +72,7 @@ static int rds_release(struct socket *sock) rds_clear_recv_queue(rs); rds_cong_remove_socket(rs); - /* - * the binding lookup hash uses rcu, we need to - * make sure we synchronize_rcu before we free our - * entry - */ rds_remove_bound(rs); - synchronize_rcu(); rds_send_drop_to(rs, NULL); rds_rdma_drop_keys(rs); |