[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helpe
From: |
Cornelia Huck |
Subject: |
Re: [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper |
Date: |
Thu, 28 May 2020 17:35:55 +0200 |
On Wed, 27 May 2020 11:29:21 +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.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> hw/virtio/virtio-pci.h | 9 +++++++++
> hw/virtio/virtio-pci.c | 7 +++++++
> 2 files changed, 16 insertions(+)
That looks like a good idea, since the policy can be easily tweaked in
one place later.
For ccw, I don't see a good way to arrive at an optimal number of
queues. Is there something we should do for mmio? If yes, should this
be a callback in VirtioBusClass?
- [PATCH v4 0/5] virtio-pci: enable blk and scsi multi-queue by default, Stefan Hajnoczi, 2020/05/27
- [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper, Stefan Hajnoczi, 2020/05/27
- Re: [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper,
Cornelia Huck <=
- [PATCH v4 2/5] virtio-scsi: introduce a constant for fixed virtqueues, Stefan Hajnoczi, 2020/05/27
- [PATCH v4 3/5] virtio-scsi: default num_queues to -smp N, Stefan Hajnoczi, 2020/05/27
- [PATCH v4 4/5] virtio-blk: default num_queues to -smp N, Stefan Hajnoczi, 2020/05/27
- [PATCH v4 5/5] vhost-user-blk: default num_queues to -smp N, Stefan Hajnoczi, 2020/05/27