Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1236581
| From | Santosh Shilimkar <santosh.shilimkar@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 06/14] RDS: use rds_send_xmit() state instead of RDS_LL_SEND_FULL |
| Date | 2015-09-30 19:40 +0200 |
| Message-ID | <qetwe-3ox-33@gated-at.bofh.it> (permalink) |
| References | <qetmx-3dp-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
In Transport indepedent rds_sendmsg(), we shouldn't make decisions based
on RDS_LL_SEND_FULL which is used to manage the ring for RDMA based
transports. We can safely issue rds_send_xmit() and the using its
return value take decision on deferred work. This will also fix
the scenario where at times we are seeing connections stuck with
the LL_SEND_FULL bit getting set and never cleared.
We kick krdsd after any time we see -ENOMEM or -EAGAIN from the
ring allocation code.
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
---
net/rds/send.c | 10 ++++++----
net/rds/threads.c | 2 ++
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/net/rds/send.c b/net/rds/send.c
index f1e709c..9d8b52d 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1122,8 +1122,9 @@ 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;
@@ -1179,8 +1180,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.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/14] RDS: connection scalability and performance improvements Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:30 +0200
[PATCH v2 13/14] RDS: IB: use max_mr from HCA caps than max_fmr Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:30 +0200
[PATCH v2 07/14] RDS: IB: ack more receive completions to improve performance Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:30 +0200
[PATCH v2 08/14] RDS: IB: split send completion handling and do batch ack Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:30 +0200
[PATCH v2 05/14] RDS: defer the over_batch work to send worker Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:40 +0200
Re: [PATCH v2 05/14] RDS: defer the over_batch work to send worker David Miller <davem@davemloft.net> - 2015-10-05 12:20 +0200
Re: [PATCH v2 05/14] RDS: defer the over_batch work to send worker santosh shilimkar <santosh.shilimkar@oracle.com> - 2015-10-05 17:40 +0200
[PATCH v2 03/14] RDS: fix rds_sock reference bug while doing bind Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:40 +0200
[PATCH v2 02/14] RDS: make socket bind/release locking scheme simple and more efficient Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:40 +0200
[PATCH v2 06/14] RDS: use rds_send_xmit() state instead of RDS_LL_SEND_FULL Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:40 +0200
[PATCH v2 04/14] RDS: Use per-bucket rw lock for bind hash-table Santosh Shilimkar <santosh.shilimkar@oracle.com> - 2015-09-30 19:40 +0200
RE: [PATCH v2 00/14] RDS: connection scalability and performance improvements David Laight <David.Laight@ACULAB.COM> - 2015-10-01 18:30 +0200
Re: [PATCH v2 00/14] RDS: connection scalability and performance improvements "santosh.shilimkar@oracle.com" <santosh.shilimkar@oracle.com> - 2015-10-01 21:10 +0200
csiph-web