Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1515784 > unrolled thread
| Started by | Christoph Hellwig <hch@lst.de> |
|---|---|
| First post | 2016-11-07 00:10 +0100 |
| Last post | 2016-11-07 15:50 +0100 |
| Articles | 4 — 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.
[PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues Christoph Hellwig <hch@lst.de> - 2016-11-07 00:10 +0100
Re: [PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues Hannes Reinecke <hare@suse.de> - 2016-11-07 09:40 +0100
Re: [PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues Hannes Reinecke <hare@suse.de> - 2016-11-07 10:40 +0100
Re: [PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues Christoph Hellwig <hch@lst.de> - 2016-11-07 15:50 +0100
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2016-11-07 00:10 +0100 |
| Subject | [PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues |
| Message-ID | <sAEJz-3lZ-3@gated-at.bofh.it> |
This allows skipping the first N IRQ vectors in case they are used for
control or admin interrupts.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-mq-pci.c | 6 ++++--
drivers/nvme/host/pci.c | 2 +-
include/linux/blk-mq-pci.h | 3 ++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/block/blk-mq-pci.c b/block/blk-mq-pci.c
index 966c216..03ff7c4 100644
--- a/block/blk-mq-pci.c
+++ b/block/blk-mq-pci.c
@@ -21,6 +21,7 @@
* blk_mq_pci_map_queues - provide a default queue mapping for PCI device
* @set: tagset to provide the mapping for
* @pdev: PCI device associated with @set.
+ * @first_vec: first interrupt vectors to use for queues (usually 0)
*
* This function assumes the PCI device @pdev has at least as many available
* interrupt vetors as @set has queues. It will then queuery the vector
@@ -28,12 +29,13 @@
* that maps a queue to the CPUs that have irq affinity for the corresponding
* vector.
*/
-int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev)
+int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev,
+ int first_vec)
{
const struct cpumask *mask;
unsigned int queue, cpu;
- for (queue = 0; queue < set->nr_hw_queues; queue++) {
+ for (queue = first_vec; queue < set->nr_hw_queues; queue++) {
mask = pci_irq_get_affinity(pdev, queue);
if (!mask)
return -EINVAL;
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 0fc99f0..a05fbaf 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -272,7 +272,7 @@ 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));
+ return blk_mq_pci_map_queues(set, to_pci_dev(dev->dev), 0);
}
/**
diff --git a/include/linux/blk-mq-pci.h b/include/linux/blk-mq-pci.h
index 6ab5952..fde26d2 100644
--- a/include/linux/blk-mq-pci.h
+++ b/include/linux/blk-mq-pci.h
@@ -4,6 +4,7 @@
struct blk_mq_tag_set;
struct pci_dev;
-int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev);
+int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev,
+ int first_vec);
#endif /* _LINUX_BLK_MQ_PCI_H */
--
2.1.4
[toc] | [next] | [standalone]
| From | Hannes Reinecke <hare@suse.de> |
|---|---|
| Date | 2016-11-07 09:40 +0100 |
| Subject | Re: [PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues |
| Message-ID | <sANDc-tf-23@gated-at.bofh.it> |
| In reply to | #1515784 |
On 11/07/2016 12:07 AM, Christoph Hellwig wrote: > This allows skipping the first N IRQ vectors in case they are used for > control or admin interrupts. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > block/blk-mq-pci.c | 6 ++++-- > drivers/nvme/host/pci.c | 2 +- > include/linux/blk-mq-pci.h | 3 ++- > 3 files changed, 7 insertions(+), 4 deletions(-) > Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)
[toc] | [prev] | [next] | [standalone]
| From | Hannes Reinecke <hare@suse.de> |
|---|---|
| Date | 2016-11-07 10:40 +0100 |
| Subject | Re: [PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues |
| Message-ID | <sAOzg-1fr-23@gated-at.bofh.it> |
| In reply to | #1515784 |
On 11/07/2016 12:07 AM, Christoph Hellwig wrote: > This allows skipping the first N IRQ vectors in case they are used for > control or admin interrupts. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > block/blk-mq-pci.c | 6 ++++-- > drivers/nvme/host/pci.c | 2 +- > include/linux/blk-mq-pci.h | 3 ++- > 3 files changed, 7 insertions(+), 4 deletions(-) > With this patch smartpqi doesn't compile anymore; it still uses the old interface. So to get this merged you probably should send a patch for that one, too. Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)
[toc] | [prev] | [next] | [standalone]
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Date | 2016-11-07 15:50 +0100 |
| Subject | Re: [PATCH 2/2] blk-mq: add a first_vec argument to blk_mq_pci_map_queues |
| Message-ID | <sATpf-4qY-25@gated-at.bofh.it> |
| In reply to | #1515947 |
On Mon, Nov 07, 2016 at 10:37:16AM +0100, Hannes Reinecke wrote: > With this patch smartpqi doesn't compile anymore; it still uses the old > interface. > So to get this merged you probably should send a patch for that one, too. I have a fixup patch for it, but as these two patches aren't against the SCSI tree I couldn't include it.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web