[rds-devel] [PATCH] RDS/IB+IW: flow control can deadlock.

Steve Wise swise at opengridcomputing.com
Tue Jan 27 11:04:54 PST 2009


From: Steve Wise <swise at opengridcomputing.com>

Removing the refilling of the recv ring from the recv completion
(interrupt) path introduced a bug where ACKs that grant send credits
will not be sent.  This bug can be tickled with rds-stress.

The fix is to try and advertise credits in the recv refill path.

Signed-off-by: Steve Wise <swise at opengridcomputing.com>
---

 drivers/infiniband/ulp/rds/ib_recv.c |    3 +++
 drivers/infiniband/ulp/rds/iw_recv.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/ulp/rds/ib_recv.c b/drivers/infiniband/ulp/rds/ib_recv.c
index ce03695..36cd1b6 100644
--- a/drivers/infiniband/ulp/rds/ib_recv.c
+++ b/drivers/infiniband/ulp/rds/ib_recv.c
@@ -859,6 +859,9 @@ int rds_ib_recv(struct rds_connection *conn)
 		rds_ib_stats_inc(s_ib_rx_refill_from_thread);
 	mutex_unlock(&ic->i_recv_mutex);
 
+	if (rds_conn_up(conn))
+		rds_ib_attempt_ack(ic);
+
 	return ret;
 }
 
diff --git a/drivers/infiniband/ulp/rds/iw_recv.c b/drivers/infiniband/ulp/rds/iw_recv.c
index 72caa7f..050ccd6 100644
--- a/drivers/infiniband/ulp/rds/iw_recv.c
+++ b/drivers/infiniband/ulp/rds/iw_recv.c
@@ -859,6 +859,9 @@ int rds_iw_recv(struct rds_connection *conn)
 		rds_iw_stats_inc(s_iw_rx_refill_from_thread);
 	mutex_unlock(&ic->i_recv_mutex);
 
+	if (rds_conn_up(conn))
+		rds_iw_attempt_ack(ic);
+
 	return ret;
 }
 



More information about the rds-devel mailing list