From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: chien.yen@oracle.com, davem@davemloft.net,
rds-devel@oss.oracle.com, agrover@redhat.com, clm@fb.com,
zab@zabbo.net, ajaykumar.hotchandani@oracle.com,
Sowmini Varadhan <sowmini.varadhan@oracle.com>
Subject: [PATCH 6/6] RDS: don't trust the LL_SEND_FULL bit
Date: Thu, 2 Apr 2015 09:50:49 -0400 [thread overview]
Message-ID: <dbc7c4e9d12f373c971c5b0d0e5936abb345ea7c.1427936719.git.sowmini.varadhan@oracle.com> (raw)
In-Reply-To: <cover.1427936719.git.sowmini.varadhan@oracle.com>
In-Reply-To: <cover.1427936719.git.sowmini.varadhan@oracle.com>
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@oracle.com>
Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
---
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;
@@ -1165,8 +1167,9 @@ rds_send_pong(struct rds_connection *conn, __be16 dport)
rds_stats_inc(s_send_queued);
rds_stats_inc(s_send_pong);
- if (!test_bit(RDS_LL_SEND_FULL, &conn->c_flags))
- queue_delayed_work(rds_wq, &conn->c_send_w, 0);
+ 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 0;
diff --git a/net/rds/threads.c b/net/rds/threads.c
index dc2402e..454aa6d 100644
--- a/net/rds/threads.c
+++ b/net/rds/threads.c
@@ -162,7 +162,9 @@ void rds_send_worker(struct work_struct *work)
int ret;
if (rds_conn_state(conn) == RDS_CONN_UP) {
+ clear_bit(RDS_LL_SEND_FULL, &conn->c_flags);
ret = rds_send_xmit(conn);
+ cond_resched();
rdsdebug("conn %p ret %d\n", conn, ret);
switch (ret) {
case -EAGAIN:
--
1.7.1
next prev parent reply other threads:[~2015-04-02 13:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 13:50 [PATCH 0/6] RDS: RDS core bug fixes Sowmini Varadhan
2015-04-02 13:50 ` [PATCH 1/6] RDS: Re-add pf/sol access via sysctl Sowmini Varadhan
2015-04-02 13:50 ` [PATCH 2/6] RDS: only use passive connections when addresses match Sowmini Varadhan
2015-04-02 13:50 ` [PATCH 3/6] rds: check for excessive looping in rds_send_xmit Sowmini Varadhan
2015-04-02 13:50 ` [PATCH 4/6] RDS: make sure not to loop forever inside rds_send_xmit Sowmini Varadhan
2015-04-02 13:50 ` [PATCH 5/6] RDS: rds_send_xmit is called under a spinlock, lets not do a cond_resched() Sowmini Varadhan
2015-04-02 13:50 ` Sowmini Varadhan [this message]
2015-04-02 14:06 ` [PATCH 6/6] RDS: don't trust the LL_SEND_FULL bit Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dbc7c4e9d12f373c971c5b0d0e5936abb345ea7c.1427936719.git.sowmini.varadhan@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=agrover@redhat.com \
--cc=ajaykumar.hotchandani@oracle.com \
--cc=chien.yen@oracle.com \
--cc=clm@fb.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=zab@zabbo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®