All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>,
	Raphael Norwitz <raphael.norwitz@nutanix.com>
Subject: Re: [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper
Date: Mon, 6 Jul 2020 16:14:36 +0200	[thread overview]
Message-ID: <20200706161436.719a1729.cohuck@redhat.com> (raw)
In-Reply-To: <20200706132520.GA355463@stefanha-x1.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1815 bytes --]

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

> On Thu, May 28, 2020 at 05:35:55PM +0200, Cornelia Huck wrote:
> > 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?  
> 
> I looked at this but virtio-pci devices need to do num_queues ->
> num_vectors -> .realize() in that order. It's hard to introduce a
> meaningful VirtioBusClass method. (The problem is that some devices
> automatically calculate the number of PCI MSI-X vectors based on the
> number of queues, but that needs to happen before .realize() and
> involves PCI-specific qdev properties.)
> 
> Trying to go through a common interface for all transports doesn't
> simplify things here.

That makes sense, thanks for checking.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-07-06 14:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 10:29 [PATCH v4 0/5] virtio-pci: enable blk and scsi multi-queue by default Stefan Hajnoczi
2020-05-27 10:29 ` [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper Stefan Hajnoczi
2020-05-28 15:35   ` Cornelia Huck
2020-06-09 15:37     ` Michael S. Tsirkin
2020-07-06 13:25     ` Stefan Hajnoczi
2020-07-06 14:14       ` Cornelia Huck [this message]
2020-05-27 10:29 ` [PATCH v4 2/5] virtio-scsi: introduce a constant for fixed virtqueues Stefan Hajnoczi
2020-05-28 14:18   ` Pankaj Gupta
2020-05-28 15:22   ` Philippe Mathieu-Daudé
2020-05-31  2:43   ` Raphael Norwitz
2020-05-27 10:29 ` [PATCH v4 3/5] virtio-scsi: default num_queues to -smp N Stefan Hajnoczi
2020-05-27 10:38   ` Daniel P. Berrangé
2020-05-28  8:50     ` Stefan Hajnoczi
2020-05-27 10:29 ` [PATCH v4 4/5] virtio-blk: " Stefan Hajnoczi
2020-05-28 14:45   ` Pankaj Gupta
2020-05-27 10:29 ` [PATCH v4 5/5] vhost-user-blk: " Stefan Hajnoczi
2020-05-31  2:42   ` Raphael Norwitz
2020-06-09 15:36     ` Michael S. Tsirkin

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=20200706161436.719a1729.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.