From: Cornelia Huck <cohuck@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <fam@euphon.net>,
Eduardo Habkost <ehabkost@redhat.com>,
qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
qemu-devel@nongnu.org,
Raphael Norwitz <raphael.norwitz@nutanix.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v5 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper
Date: Tue, 7 Jul 2020 17:46:47 +0200 [thread overview]
Message-ID: <20200707174647.5184a094.cohuck@redhat.com> (raw)
In-Reply-To: <20200706135650.438362-2-stefanha@redhat.com>
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>
next prev parent reply other threads:[~2020-07-07 15:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 13:56 [PATCH v5 0/5] virtio-pci: enable blk and scsi multi-queue by default Stefan Hajnoczi
2020-07-06 13:56 ` [PATCH v5 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper Stefan Hajnoczi
2020-07-07 15:46 ` Cornelia Huck [this message]
2020-07-06 13:56 ` [PATCH v5 2/5] virtio-scsi: introduce a constant for fixed virtqueues Stefan Hajnoczi
2020-07-06 13:56 ` [PATCH v5 3/5] virtio-scsi: default num_queues to -smp N Stefan Hajnoczi
2020-07-07 15:44 ` Cornelia Huck
2020-07-08 13:05 ` Stefan Hajnoczi
2020-07-08 16:50 ` Cornelia Huck
2020-07-13 10:22 ` Stefan Hajnoczi
2020-07-08 13:08 ` Stefan Hajnoczi
2020-07-06 13:56 ` [PATCH v5 4/5] virtio-blk: " Stefan Hajnoczi
2020-07-06 13:56 ` [PATCH v5 5/5] vhost-user-blk: " Stefan Hajnoczi
2020-07-09 18:02 ` Raphael Norwitz
2020-07-10 12:53 ` Stefan Hajnoczi
2020-07-10 18:48 ` Raphael Norwitz
2020-07-08 10:59 ` [PATCH v5 0/5] virtio-pci: enable blk and scsi multi-queue by default Michael S. Tsirkin
2020-07-08 12:59 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200707174647.5184a094.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pankaj.gupta.linux@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=raphael.norwitz@nutanix.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.