qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helpe


From: Cornelia Huck
Subject: Re: [PATCH v5 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper
Date: Tue, 7 Jul 2020 17:46:47 +0200

On Mon,  6 Jul 2020 14:56:46 +0100
Stefan Hajnoczi <stefanha@redhat.com> wrote:

> Multi-queue devices achieve the best performance when each vCPU has a
> dedicated queue. This ensures that virtqueue used notifications are
> handled on the same vCPU that submitted virtqueue buffers.  When another
> vCPU handles the the notification an IPI will be necessary to wake the
> submission vCPU and this incurs a performance overhead.
> 
> Provide a helper function that virtio-pci devices will use in later
> patches to automatically select the optimal number of queues.
> 
> The function handles guests with large numbers of CPUs by limiting the
> number of queues to fit within the following constraints:
> 1. The maximum number of MSI-X vectors.
> 2. The maximum number of virtqueues.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  hw/virtio/virtio-pci.h |  9 +++++++++
>  hw/virtio/virtio-pci.c | 32 ++++++++++++++++++++++++++++++++
>  2 files changed, 41 insertions(+)

I guess this should honour all relevant limits now.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]