Commit 0c484240 authored by santosh.shilimkar@oracle.com's avatar santosh.shilimkar@oracle.com Committed by David S. Miller

RDS: check for congestion updates during rds_send_xmit

Ensure we don't keep sending the data if the link is congested.
Reviewed-by: default avatarAjaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: default avatarSantosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73ce4317
...@@ -411,7 +411,8 @@ int rds_send_xmit(struct rds_connection *conn) ...@@ -411,7 +411,8 @@ int rds_send_xmit(struct rds_connection *conn)
*/ */
if (ret == 0) { if (ret == 0) {
smp_mb(); smp_mb();
if (!list_empty(&conn->c_send_queue) && if ((test_bit(0, &conn->c_map_queued) ||
!list_empty(&conn->c_send_queue)) &&
send_gen == conn->c_send_gen) { send_gen == conn->c_send_gen) {
rds_stats_inc(s_send_lock_queue_raced); rds_stats_inc(s_send_lock_queue_raced);
goto restart; goto restart;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment