From: sagi@grimberg.me (Sagi Grimberg)
Subject: nvme-rdma and rdma comp vector affinity problem
Date: Mon, 16 Jul 2018 09:51:07 +0300 [thread overview]
Message-ID: <c3faccbe-a3ac-96ac-00f9-1dd5997b5510@grimberg.me> (raw)
In-Reply-To: <984d4c8e-16b9-d459-e4b9-bf1703b4c226@opengridcomputing.com>
> Hey Sagi and Christoph,
>
> Do you all have any thoughts on this?? It seems like a bug in nvme-rdma
> or the blk-mq code.?? I can debug it further, if we agree this does look
> like a bug...
It is a bug... blk-mq tells expects us to skip unmapped queues but
we fail the controller altogether...
I assume managed affinity would have take care of linearization for us..
Does this quick untested patch work?
--
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 8023054ec83e..766d10acb1b9 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -604,20 +604,33 @@ static int nvme_rdma_start_queue(struct
nvme_rdma_ctrl *ctrl, int idx)
static int nvme_rdma_start_io_queues(struct nvme_rdma_ctrl *ctrl)
{
- int i, ret = 0;
+ int i, ret = 0, count = 0;
for (i = 1; i < ctrl->ctrl.queue_count; i++) {
ret = nvme_rdma_start_queue(ctrl, i);
- if (ret)
+ if (ret) {
+ if (ret == -EXDEV) {
+ /* unmapped queue, skip ... */
+ nvme_rdma_free_queue(&ctrl->queues[i]);
+ continue;
+ }
goto out_stop_queues;
+ }
+ count++;
}
+ if (!count)
+ /* no started queues, fail */
+ goto out_stop_queues;
+
+ dev_info(ctrl->ctrl.device, "connected %d I/O queues.\n", count);
+
return 0;
out_stop_queues:
for (i--; i >= 1; i--)
nvme_rdma_stop_queue(&ctrl->queues[i]);
- return ret;
+ return -EIO;
}
static int nvme_rdma_alloc_io_queues(struct nvme_rdma_ctrl *ctrl)
--
next prev parent reply other threads:[~2018-07-16 6:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 19:25 nvme-rdma and rdma comp vector affinity problem Steve Wise
2018-07-12 15:10 ` Steve Wise
2018-07-15 7:58 ` Max Gurtovoy
2018-07-16 14:34 ` Steve Wise
2018-07-16 6:51 ` Sagi Grimberg [this message]
2018-07-16 15:11 ` Steve Wise
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=c3faccbe-a3ac-96ac-00f9-1dd5997b5510@grimberg.me \
--to=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).