aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/rds.h
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-03-23 20:39:07 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:12:12 -0400
commit049ee3f500954176a87f22e6ee3e98aecb1b8958 (patch)
tree5dfd8cf3e6d9a7a15e80f6ddee7f4ce7c4aa7a8c /net/rds/rds.h
parentf17a1a55fb672d7f64be7f2e940ef5669e5efa0a (diff)
RDS: Change send lock from a mutex to a spinlock
This change allows us to call rds_send_xmit() from a tasklet, which is crucial to our new operating model. * Change c_send_lock to a spinlock * Update stats fields "sem_" to "_lock" * Remove unneeded rds_conn_is_sending() About locking between shutdown and send -- send checks if the connection is up. Shutdown puts the connection into DISCONNECTING. After this, all threads entering send will exit immediately. However, a thread could be *in* send_xmit(), so shutdown acquires the c_send_lock to ensure everyone is out before proceeding with connection shutdown. Signed-off-by: Andy Grover <andy.grover@oracle.com>
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r--net/rds/rds.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/rds/rds.h b/net/rds/rds.h
index e81d7e478474..c3a668b9cc14 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -91,7 +91,7 @@ struct rds_connection {
91 struct rds_cong_map *c_lcong; 91 struct rds_cong_map *c_lcong;
92 struct rds_cong_map *c_fcong; 92 struct rds_cong_map *c_fcong;
93 93
94 struct mutex c_send_lock; /* protect send ring */ 94 spinlock_t c_send_lock; /* protect send ring */
95 struct rds_message *c_xmit_rm; 95 struct rds_message *c_xmit_rm;
96 unsigned long c_xmit_sg; 96 unsigned long c_xmit_sg;
97 unsigned int c_xmit_hdr_off; 97 unsigned int c_xmit_hdr_off;
@@ -548,8 +548,8 @@ struct rds_statistics {
548 uint64_t s_recv_ping; 548 uint64_t s_recv_ping;
549 uint64_t s_send_queue_empty; 549 uint64_t s_send_queue_empty;
550 uint64_t s_send_queue_full; 550 uint64_t s_send_queue_full;
551 uint64_t s_send_sem_contention; 551 uint64_t s_send_lock_contention;
552 uint64_t s_send_sem_queue_raced; 552 uint64_t s_send_lock_queue_raced;
553 uint64_t s_send_immediate_retry; 553 uint64_t s_send_immediate_retry;
554 uint64_t s_send_delayed_retry; 554 uint64_t s_send_delayed_retry;
555 uint64_t s_send_drop_acked; 555 uint64_t s_send_drop_acked;