Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1490489 > unrolled thread
| Started by | Sagi Grimberg <sagi@grimberg.me> |
|---|---|
| First post | 2016-09-24 00:30 +0200 |
| Last post | 2016-09-26 17:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 11/13] nvme: switch to use pci_alloc_irq_vectors Sagi Grimberg <sagi@grimberg.me> - 2016-09-24 00:30 +0200
Re: [PATCH 11/13] nvme: switch to use pci_alloc_irq_vectors Christoph Hellwig <hch@lst.de> - 2016-09-26 17:10 +0200
| From | Sagi Grimberg <sagi@grimberg.me> |
|---|---|
| Date | 2016-09-24 00:30 +0200 |
| Subject | Re: [PATCH 11/13] nvme: switch to use pci_alloc_irq_vectors |
| Message-ID | <skH8J-1e4-7@gated-at.bofh.it> |
On 14/09/16 07:18, Christoph Hellwig wrote:
> Use the new helper to automatically select the right interrupt type, as
> well as to use the automatic interupt affinity assignment.
Patch title and the change description are a little short IMO to
describe what is going on here (need the blk-mq side too).
I'd also think it would be better to split this to 2 patches but
really not a must...
> +static int nvme_pci_map_queues(struct blk_mq_tag_set *set)
> +{
> + struct nvme_dev *dev = set->driver_data;
> +
> + return blk_mq_pci_map_queues(set, to_pci_dev(dev->dev));
> +}
> +
Question: is using pci_alloc_irq_vectors() obligated for
supplying blk-mq with the device affinity mask?
If I do this completely-untested [1] what will happen?
[1]:
--
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 8d2875b4c56d..76693d406efe 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1518,6 +1518,14 @@ static void nvme_rdma_complete_rq(struct request *rq)
blk_mq_end_request(rq, error);
}
+static int nvme_rdma_map_queues(struct blk_mq_tag_set *set)
+{
+ struct nvme_rdma_ctrl *ctrl = set->driver_data;
+ struct device *dev = ctrl->device->dev.dma_device;
+
+ return blk_mq_pci_map_queues(set, to_pci_dev(dev));
+}
+
static struct blk_mq_ops nvme_rdma_mq_ops = {
.queue_rq = nvme_rdma_queue_rq,
.complete = nvme_rdma_complete_rq,
@@ -1528,6 +1536,7 @@ static struct blk_mq_ops nvme_rdma_mq_ops = {
.init_hctx = nvme_rdma_init_hctx,
.poll = nvme_rdma_poll,
.timeout = nvme_rdma_timeout,
+ .map_queues = nvme_rdma_map_queues,
};
static struct blk_mq_ops nvme_rdma_admin_mq_ops = {
--
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2016-09-26 17:10 +0200 |
| Message-ID | <slFHz-5oB-9@gated-at.bofh.it> |
| In reply to | #1490489 |
On Fri, Sep 23, 2016 at 03:21:14PM -0700, Sagi Grimberg wrote: > Question: is using pci_alloc_irq_vectors() obligated for > supplying blk-mq with the device affinity mask? No, but it's very useful. We'll need equivalents for other busses that provide multipl vectors and vector spreading. > If I do this completely-untested [1] what will happen? Everything will be crashing and burning because you call to_pci_dev on something that's not a PCI dev? For the next merge window I plan to wire up the affinity information for the RDMA code, and I will add a counterpart to blk_mq_pci_map_queues that spreads the queues over the completion vectors.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web