linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvme-rdma: Add debug message when reaches timeout
@ 2017-10-18  7:44 Nitzan Carmi
  2017-10-18 10:44 ` Sagi Grimberg
  2017-10-18 11:17 ` roy
  0 siblings, 2 replies; 7+ messages in thread
From: Nitzan Carmi @ 2017-10-18  7:44 UTC (permalink / raw)


Signed-off-by: Nitzan Carmi <nitzanc at mellanox.com>
Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/rdma.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 92a03ff..00c033e 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1582,6 +1582,10 @@ nvme_rdma_timeout(struct request *rq, bool reserved)
 {
 	struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);

+	dev_dbg_ratelimited(req->queue->ctrl->ctrl.device,
+						"Reached timeout - cid %d qid %d", rq->tag,
+						cpu_to_le16(nvme_rdma_queue_idx(req->queue)));
+
 	/* queue error recovery */
 	nvme_rdma_error_recovery(req->queue->ctrl);

--
2.9.4

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

* [PATCH] nvme-rdma: Add debug message when reaches timeout
  2017-10-18  7:44 Nitzan Carmi
@ 2017-10-18 10:44 ` Sagi Grimberg
  2017-10-18 11:17 ` roy
  1 sibling, 0 replies; 7+ messages in thread
From: Sagi Grimberg @ 2017-10-18 10:44 UTC (permalink / raw)


> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 92a03ff..00c033e 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -1582,6 +1582,10 @@ nvme_rdma_timeout(struct request *rq, bool reserved)
>   {
>   	struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
> 
> +	dev_dbg_ratelimited(req->queue->ctrl->ctrl.device,
> +						"Reached timeout - cid %d qid %d", rq->tag,
> +						cpu_to_le16(nvme_rdma_queue_idx(req->queue)));
> +

The alignment needs fixing.

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

* [PATCH] nvme-rdma: Add debug message when reaches timeout
  2017-10-18  7:44 Nitzan Carmi
  2017-10-18 10:44 ` Sagi Grimberg
@ 2017-10-18 11:17 ` roy
  1 sibling, 0 replies; 7+ messages in thread
From: roy @ 2017-10-18 11:17 UTC (permalink / raw)


On 18/10/17 10:44, Nitzan Carmi wrote:
> Signed-off-by: Nitzan Carmi <nitzanc at mellanox.com>
> Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
> ---
>   drivers/nvme/host/rdma.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
> index 92a03ff..00c033e 100644
> --- a/drivers/nvme/host/rdma.c
> +++ b/drivers/nvme/host/rdma.c
> @@ -1582,6 +1582,10 @@ nvme_rdma_timeout(struct request *rq, bool reserved)
>   {
>   	struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
>
> +	dev_dbg_ratelimited(req->queue->ctrl->ctrl.device,
> +						"Reached timeout - cid %d qid %d", rq->tag,
> +						cpu_to_le16(nvme_rdma_queue_idx(req->queue)));
I guess cid is command id, I think it will be better to print the 
nvme_command attributes.
something like

struct nvme_command *cmd = req->sqe.data;

and to print
cmd->common.command_id, cmd->common.opcode and the queue_id like you 
printed.

Also why printing queue idx in little Indian format?
> +
>   	/* queue error recovery */
>   	nvme_rdma_error_recovery(req->queue->ctrl);
>
> --
> 2.9.4
>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* [PATCH] nvme-rdma: Add debug message when reaches timeout
@ 2017-10-20  8:24 Nitzan Carmi
  2017-10-20 10:03 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Nitzan Carmi @ 2017-10-20  8:24 UTC (permalink / raw)


Signed-off-by: Nitzan Carmi <nitzanc at mellanox.com>
Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/rdma.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 92a03ff..8d2bbd7 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1581,6 +1581,12 @@ static enum blk_eh_timer_return
 nvme_rdma_timeout(struct request *rq, bool reserved)
 {
 	struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
+	struct nvme_command *cmd = req->sqe.data;
+
+	dev_dbg_ratelimited(req->queue->ctrl->ctrl.device,
+			    "Reached timeout: command id %d opcode %d qid %d",
+			    cmd->common.command_id, cmd->common.opcode,
+			    nvme_rdma_queue_idx(req->queue));
 
 	/* queue error recovery */
 	nvme_rdma_error_recovery(req->queue->ctrl);
-- 
2.9.4

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

* [PATCH] nvme-rdma: Add debug message when reaches timeout
  2017-10-20  8:24 Nitzan Carmi
@ 2017-10-20 10:03 ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2017-10-20 10:03 UTC (permalink / raw)


Can you please follow the message format/type used by the PCIe driver?

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

* [PATCH] nvme-rdma: Add debug message when reaches timeout
@ 2017-10-22  9:37 Nitzan Carmi
  2017-10-23 14:27 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Nitzan Carmi @ 2017-10-22  9:37 UTC (permalink / raw)


Signed-off-by: Nitzan Carmi <nitzanc at mellanox.com>
Reviewed-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/host/rdma.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 92a03ff..f2f9a47 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1582,6 +1582,10 @@ nvme_rdma_timeout(struct request *rq, bool reserved)
 {
 	struct nvme_rdma_request *req = blk_mq_rq_to_pdu(rq);
 
+	dev_warn(req->queue->ctrl->ctrl.device,
+		 "I/O %d QID %d timeout, recover controller\n",
+		 rq->tag, nvme_rdma_queue_idx(req->queue));
+
 	/* queue error recovery */
 	nvme_rdma_error_recovery(req->queue->ctrl);
 
-- 
2.9.4

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

* [PATCH] nvme-rdma: Add debug message when reaches timeout
  2017-10-22  9:37 [PATCH] nvme-rdma: Add debug message when reaches timeout Nitzan Carmi
@ 2017-10-23 14:27 ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2017-10-23 14:27 UTC (permalink / raw)


I'll apply it for 4.15 after fixing up the message to really match
PCI..

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

end of thread, other threads:[~2017-10-23 14:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-22  9:37 [PATCH] nvme-rdma: Add debug message when reaches timeout Nitzan Carmi
2017-10-23 14:27 ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2017-10-20  8:24 Nitzan Carmi
2017-10-20 10:03 ` Christoph Hellwig
2017-10-18  7:44 Nitzan Carmi
2017-10-18 10:44 ` Sagi Grimberg
2017-10-18 11:17 ` roy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).