All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Zhu, Lingshan" <lingshan.zhu@intel.com>
Cc: Jason Wang <jasowang@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	nrupal.jani@intel.com, "Uminski, Piotr" <Piotr.Uminski@intel.com>,
	hang.yuan@intel.com, virtio-comment@lists.oasis-open.org
Subject: Re: [virtio-comment] [PATCH V3 RESEND 2/4] Introduce the commands set of the transport vq
Date: Wed, 10 Aug 2022 08:58:29 -0400	[thread overview]
Message-ID: <20220810084723-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <aae0a39c-1431-3d64-ce5d-17781795623f@intel.com>

On Wed, Aug 10, 2022 at 04:49:25PM +0800, Zhu, Lingshan wrote:
> > I meant having MSI vectors and let the virtqueue refer to the MSI vectors.
> > 
> > Current design means for a 1024 virtqueues device to store 1024 MSI entries.
> > With the indirection of the MSI vectors array, the device is free to
> > have 1 to 1024 MSI entries.
> I am not sure I get your points, how can the queues decide the MSI entries,
> it should
> be the driver and the platform set the vq's MSI. The driver has to
> decide/control and handle
> the MSI interrupts.
> 
> IMHO there are two options:
> 1)every virtqueue stores its own MSI vector, per-vq MSI vector can get
> better performance
> for sure. But if there are limited MSI resources, the driver may decide to
> share MSI vectors
> among the vqs(1k queues, 1 to 1024 MSI entries), and there should be proper
> interrupt handlers in the driver.
> 
> 2)add a device scope MSI entry(only for vqs, not config interrupt, because
> we don't want to look into config space every time receive a vq interrupt),
> all interrupts from the device are through this MSI entry,
> this is optional, can help save resource. But this is complex, like first
> set a device scope MSI for all vqs, then set a MSI for vq1, in this case,
> we need vq1 use its own MSI to send interrupts, shadows the device MSI. This
> is complex, maybe not worthy, I think the platform(x86, arm) has enough
> MSI resource and it is just one vector per vq.

Consider a PCI device with subfunctions for example. It maintains
MSI-X vectors in an MSI-X table. vq has to select a vector from
that table. Which one?
1- vq can map to a vector number (this is what PCI)
2- vq can just imply vector number e.g. if vector number == vq number
3- vq can include a copy of vector itself

3 will force us to come up with a way to mask vectors in the transport,
not nice.

-- 
MST


  reply	other threads:[~2022-08-10 12:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  9:53 [virtio-comment] [PATCH V3 RESEND 0/4] Introduce virtio transport virtqueue Zhu Lingshan
2022-08-05  9:53 ` [virtio-comment] [PATCH V3 RESEND 1/4] Introduce virito " Zhu Lingshan
2022-08-08  9:12   ` Jason Wang
2022-08-09  8:36     ` Zhu, Lingshan
2022-08-09  9:12       ` Michael S. Tsirkin
2022-08-09  9:19         ` Zhu, Lingshan
2022-08-09  9:21           ` Jason Wang
2022-08-09  9:28             ` Zhu, Lingshan
2022-08-09  9:31               ` Jason Wang
2022-08-09  9:35                 ` Michael S. Tsirkin
2022-08-09  9:37                   ` Jason Wang
2022-08-09  9:43                     ` Zhu, Lingshan
2022-08-09  9:33               ` Michael S. Tsirkin
2022-08-09  9:29           ` Michael S. Tsirkin
2022-08-09  9:43             ` Zhu, Lingshan
2022-08-09 20:57               ` Michael S. Tsirkin
2022-08-09  9:28         ` Jason Wang
2022-08-09 21:03           ` Michael S. Tsirkin
2022-08-10  7:41             ` Jason Wang
2022-08-10  9:04               ` Michael S. Tsirkin
2022-08-05  9:53 ` [virtio-comment] [PATCH V3 RESEND 2/4] Introduce the commands set of the transport vq Zhu Lingshan
2022-08-08 10:04   ` Jason Wang
2022-08-09 13:09     ` Zhu, Lingshan
2022-08-10  1:56       ` Jason Wang
2022-08-10  8:49         ` Zhu, Lingshan
2022-08-10 12:58           ` Michael S. Tsirkin [this message]
2022-08-16  5:55             ` Zhu, Lingshan
2022-08-16  6:21               ` Michael S. Tsirkin
2022-08-16  8:53                 ` Zhu, Lingshan
2022-08-10  9:34         ` Michael S. Tsirkin
2022-08-16  9:02           ` Zhu, Lingshan
2022-08-05  9:53 ` [virtio-comment] [PATCH V3 RESEND 3/4] Describe the process to present a managed device Zhu Lingshan
2022-08-05  9:53 ` [virtio-comment] [PATCH V3 RESEND 4/4] Add transport vq number for virtio blk and net Zhu Lingshan

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=20220810084723-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=Piotr.Uminski@intel.com \
    --cc=cohuck@redhat.com \
    --cc=hang.yuan@intel.com \
    --cc=jasowang@redhat.com \
    --cc=lingshan.zhu@intel.com \
    --cc=nrupal.jani@intel.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    /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.