public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvme-rdma: set ack timeout of RoCE to 262ms
@ 2022-08-19  7:58 Chao Leng
  2022-08-21  6:20 ` Christoph Hellwig
  0 siblings, 1 reply; 13+ messages in thread
From: Chao Leng @ 2022-08-19  7:58 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, sagi, kbusch, lengchao

Now the ack timeout of RoCE is 2 second(2^(18+1)*4us=2 second). In the
case of low concurrency, if some packets lost due to network abnormal
such as network rerouting, Optical fiber signal interference, etc,
it will wait 2 second to try retransmitting the lost packets.
As a result, the I/O latency is greater than 2 seconds.
The I/O latency is so long for real-time transaction service. Indeed we
do not have to wait so long time to make sure that packets are lost.
Setting the ack timeout to 262ms(2^(15+1)*4us=262ms) is sufficient.

Signed-off-by: Chao Leng <lengchao@huawei.com>
---
 drivers/nvme/host/rdma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 7d01fb770284..2dbb1b21acc8 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -602,6 +602,8 @@ static int nvme_rdma_alloc_queue(struct nvme_rdma_ctrl *ctrl,
 		ret = PTR_ERR(queue->cm_id);
 		goto out_destroy_mutex;
 	}
+	/* set ack timeout to 262ms(2^(15+1)*4us=262ms) */
+	rdma_set_ack_timeout(queue->cm_id, 15);
 
 	if (ctrl->ctrl.opts->mask & NVMF_OPT_HOST_TRADDR)
 		src_addr = (struct sockaddr *)&ctrl->src_addr;
-- 
2.16.4



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-11-16  2:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-19  7:58 [PATCH] nvme-rdma: set ack timeout of RoCE to 262ms Chao Leng
2022-08-21  6:20 ` Christoph Hellwig
2022-08-22  9:50   ` Chao Leng
2022-08-22 15:30     ` Max Gurtovoy
2022-08-25  9:58       ` Chao Leng
2022-08-28 14:57         ` Sagi Grimberg
2022-08-29  8:05           ` Chao Leng
2022-08-29  9:06             ` Sagi Grimberg
2022-08-29 13:15               ` Chao Leng
2022-10-10  9:12                 ` Chao Leng
2022-10-14  0:05                   ` Max Gurtovoy
2022-10-14  2:15                     ` Chao Leng
2022-11-16  2:24                       ` Chao Leng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox