We are seeing connections stuck with the LL_SEND_FULL bit getting
set and never cleared. This changes RDS to stop trusting the
LL_SEND_FULL bit and kick krdsd after any time we
see -ENOMEM from the ring allocation code.
Original patch by Chris Mason
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@xxxxxxxxxx>
Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@xxxxxxxxxx>
---
net/rds/send.c | 11 +++++++----
net/rds/threads.c | 2 ++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/net/rds/send.c b/net/rds/send.c
index 23135a8..9d9c90c 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1108,8 +1108,10 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
*/
rds_stats_inc(s_send_queued);
- if (!test_bit(RDS_LL_SEND_FULL, &conn->c_flags))
- rds_send_xmit(conn);
+ ret = rds_send_xmit(conn);
+ if (ret == -ENOMEM || ret == -EAGAIN)
+ queue_delayed_work(rds_wq, &conn->c_send_w, 1);
+
[...]
rds_message_put(rm);
return payload_len;