vhost-user-blk-pci: default num_queues to -smp N
commita4eef0711b2cf7a7476c3e2c202a414b68a1baa0
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 18 Aug 2020 14:33:48 +0000 (18 15:33 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 27 Aug 2020 12:29:13 +0000 (27 08:29 -0400)
treefaab55d185ae4aff1ce2d2dd9ba31b2b77ee5722
parent9445e1e15e66c19e42bea942ba810db28052cd05
vhost-user-blk-pci: default num_queues to -smp N

Automatically size the number of request virtqueues to match the number
of vCPUs.  This ensures that completion interrupts are handled on the
same vCPU that submitted the request.  No IPI is necessary to complete
an I/O request and performance is improved.  The maximum number of MSI-X
vectors and virtqueues limit are respected.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20200818143348.310613-8-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/block/vhost-user-blk.c
hw/core/machine.c
hw/virtio/vhost-user-blk-pci.c
include/hw/virtio/vhost-user-blk.h