virtio: allow drivers to request IRQ affinity when creating VQs
authorChristoph Hellwig <hch@lst.de>
Sun, 5 Feb 2017 17:15:22 +0000 (18:15 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 27 Feb 2017 18:54:04 +0000 (20:54 +0200)
commitfb5e31d970ce8b4941f03ed765d7dbefc39f22d9
treef7b64532549f35aad0933fae46346e59151d3a71
parent52a61516125fa9a21b3bdf4f90928308e2e5573f
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>
20 files changed:
drivers/block/virtio_blk.c
drivers/char/virtio_console.c
drivers/crypto/virtio/virtio_crypto_core.c
drivers/gpu/drm/virtio/virtgpu_kms.c
drivers/misc/mic/vop/vop_main.c
drivers/net/caif/caif_virtio.c
drivers/net/virtio_net.c
drivers/remoteproc/remoteproc_virtio.c
drivers/rpmsg/virtio_rpmsg_bus.c
drivers/s390/virtio/kvm_virtio.c
drivers/s390/virtio/virtio_ccw.c
drivers/scsi/virtio_scsi.c
drivers/virtio/virtio_balloon.c
drivers/virtio/virtio_input.c
drivers/virtio/virtio_mmio.c
drivers/virtio/virtio_pci_common.c
drivers/virtio/virtio_pci_common.h
drivers/virtio/virtio_pci_modern.c
include/linux/virtio_config.h
net/vmw_vsock/virtio_transport.c