summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-05 20:15:22 +0300
committerMichael S. Tsirkin <mst@redhat.com>2017-02-27 21:54:04 +0300
commitfb5e31d970ce8b4941f03ed765d7dbefc39f22d9 (patch)
treef7b64532549f35aad0933fae46346e59151d3a71 /drivers/block
parent52a61516125fa9a21b3bdf4f90928308e2e5573f (diff)
downloadlinux-fb5e31d970ce8b4941f03ed765d7dbefc39f22d9.tar.xz
virtio: allow drivers to request IRQ affinity when creating VQs
Add a struct irq_affinity pointer to the find_vqs methods, which if set is used to tell the PCI layer to create the MSI-X vectors for our I/O virtqueues with the proper affinity from the start. Compared to after the fact affinity hints this gives us an instantly working setup and allows to allocate the irq descritors node-local and avoid interconnect traffic. Last but not least this will allow blk-mq queues are created based on the interrupt affinity for storage drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/virtio_blk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 10332c24f961..c54118bdc67d 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -411,7 +411,8 @@ static int init_vq(struct virtio_blk *vblk)
}
/* Discover virtqueues and write information to configuration. */
- err = vdev->config->find_vqs(vdev, num_vqs, vqs, callbacks, names);
+ err = vdev->config->find_vqs(vdev, num_vqs, vqs, callbacks, names,
+ NULL);
if (err)
goto out;