From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Zhu, Lingshan" <lingshan.zhu@intel.com>
Cc: Jason Wang <jasowang@redhat.com>, Parav Pandit <parav@nvidia.com>,
"virtio-comment@lists.oasis-open.org"
<virtio-comment@lists.oasis-open.org>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"sburla@marvell.com" <sburla@marvell.com>,
Shahaf Shuler <shahafs@nvidia.com>,
Maor Gottlieb <maorg@nvidia.com>,
Yishai Hadas <yishaih@nvidia.com>
Subject: Re: [virtio-comment] Re: [PATCH v3 6/8] admin: Add theory of operation for write recording commands
Date: Fri, 17 Nov 2023 04:55:26 -0500 [thread overview]
Message-ID: <20231117045200-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <37c65584-2d55-4221-8755-dd174476cc3b@intel.com>
On Fri, Nov 17, 2023 at 05:50:24PM +0800, Zhu, Lingshan wrote:
>
>
> On 11/16/2023 8:18 PM, Michael S. Tsirkin wrote:
> > On Thu, Nov 16, 2023 at 05:38:35PM +0800, Zhu, Lingshan wrote:
> > >
> > > On 11/15/2023 7:52 PM, Michael S. Tsirkin wrote:
> > > > On Wed, Nov 15, 2023 at 04:42:56PM +0800, Zhu, Lingshan wrote:
> > > > > On 11/15/2023 4:05 PM, Michael S. Tsirkin wrote:
> > > > > > On Wed, Nov 15, 2023 at 03:59:16PM +0800, Zhu, Lingshan wrote:
> > > > > > > On 11/15/2023 3:51 PM, Michael S. Tsirkin wrote:
> > > > > > > > On Wed, Nov 15, 2023 at 12:05:59PM +0800, Zhu, Lingshan wrote:
> > > > > > > > > On 11/14/2023 4:27 PM, Michael S. Tsirkin wrote:
> > > > > > > > > > On Tue, Nov 14, 2023 at 03:34:32PM +0800, Zhu, Lingshan wrote:
> > > > > > > > > > > > > So I can't
> > > > > > > > > > > > > believe it has good performance overall. Logging via IOMMU or using
> > > > > > > > > > > > > shadow virtqueue doesn't need any extra PCI transactions at least.
> > > > > > > > > > > > On the other hand they have an extra CPU cost. Personally if this is
> > > > > > > > > > > > coming from a hardware vendor, I am inclined to trust them wrt PCI
> > > > > > > > > > > > transactions. But anyway, discussing this at a high level theoretically
> > > > > > > > > > > > is pointless - whoever bothers with actual prototyping for performance
> > > > > > > > > > > > testing wins, if no one does I'd expect a back of a napkin estimate
> > > > > > > > > > > > to be included.
> > > > > > > > > > > if so, Intel has released productions implementing these interfaces years
> > > > > > > > > > > ago,
> > > > > > > > > > > see live migration in 4.1. IFCVF vDPA Implementation,
> > > > > > > > > > > https://doc.dpdk.org/guides-21.11/vdpadevs/ifc.html
> > > > > > > > > > > and
> > > > > > > > > > That one is based on shadow queue, right? Which I think this shows
> > > > > > > > > > is worth supporting.
> > > > > > > > > Yes, it is shadow virtqueue, I assume this is already mostly done,
> > > > > > > > > do you see any gaps we need to address in our series that we should work on?
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > There were a ton of comments posted on your series.
> > > > > > > Hope I didn't miss anything. I see your latest comments are about vq states,
> > > > > > > as replied before, I think we can record the states by two le16 and the
> > > > > > > in-flight
> > > > > > > descriptor tracking facility.
> > > > > > I don't know why you need the le16. in-flight tracking should be enough.
> > > > > > And given it needs DMA I would try really hard to actually use
> > > > > > admin commands for this.
> > > > > we need to record the on-device avail_idx and used_idx, or
> > > > > how can the destination side know the device internal values.
> > > > Again you never documented what state the device is in so I can't really
> > > > say for sure. But generally whenever a buffer is used the internal
> > > > values are written out to memory.
> > > This is the state of a virtqueue, in my series I have defined what is
> > > vq state in [PATCH V2 1/6] virtio: introduce virtqueue state,
> > > and give an example of PCI implementation.
> > >
> > > In short, for split vq it is last_avail_idx and in-flight descriptors.
> > >
> > > I humbly request an explicit list of missing gaps, so that I can improve my
> > > V3
> > >
> > > Thanks
> > I don't know how to help you without resorting to writing it instead of
> > you, I sent 3 messages in response to that one patch alone. Your patch
> > just adds some bits here and there without much in the way of
> > documentation. Patch needs to explain what these things are and how do they
> > interact with VQ state in memory.
> Please allow me quote the series:
> +The available state field is two bytes of virtqueue state that is used by
> +the device to read the next available buffer. It is presented in the
> following format:
> +
> +\begin{lstlisting}
> +le16 last_avail_idx;
> +\end{lstlisting}
> +
> +The \field{last_avail_idx} field is the free-running available ring
> +index where the device will read the next available head of a
> +descriptor chain.
Next *after what*? The last used buffer? This is exactly the used index.
>
> +When SUSPEND is set, the device MUST record the Available State of every
> enabled splited virtqueue
> +in \field{Available State} field,
> +and correspondingly restore the Available State of every enabled splited
> virtqueue
> +from \field{Available State} field when DRIVER_OK is set.
> +
> +The device SHOULD reset \field{Available State} field upon a device reset
>
> I will add these contents in next series:
> 1) vq states refer to the device internal states, so have to record and
> restore them
> 2) in-flight descriprots tracking.
>
> Not sure whether I should describe how in-guest-memory vq config migrated,
> because they migrated with guest memory.
> >
> >
> > But besides, Parav needs to do exactly the same too. So why don't you
> > let Parav do the work on this and then later just add a small interface
> > to send admin commands through VF itself? Looks like this will be good
> I think this is the topic: shall we process admin cmds in config space.....
> > enough for VDPA. Meanwhile I feel your energy would be better spend
> > working on transport vq which no one else is working on.
> I can start rework on transport vq next week.
>
> Thanks
> >
> >
> >
> >
> > > > > > > For this shadow virtqueue, do you think I should address this in my V4?
> > > > > > > Like saying: acknowledged control commands through the control virtqueue
> > > > > > > should be recorded, and we want to use shadow virtqueue to track dirty
> > > > > > > pages.
> > > > > > What you need to do is actually describe what do you expect the device
> > > > > > to do when it enters this suspend state. since you mention control
> > > > > > virtqueue then it seems that there needs to be a device type
> > > > > > specific text explaining the behaviour. If so this implies there
> > > > > > needs to be a list of device types that support suspend
> > > > > > until someone looks at each type and documents what it does.
> > > > > On a second thought, shadow vqs are hypervisor behaviors, maybe should not
> > > > > be
> > > > > described in this device spec.
> > > > >
> > > > > Since SUSPEND is in device status, so for now I see every type of device
> > > > > implements
> > > > > device_status should support SUSPEND. This should be a general facility.
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
next prev parent reply other threads:[~2023-11-17 9:55 UTC|newest]
Thread overview: 157+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 13:19 [virtio-comment] [PATCH v3 0/8] Introduce device migration support commands Parav Pandit
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 1/8] admin: Add theory of operation for device migration Parav Pandit
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 2/8] admin: Redefine reserved2 as command specific output Parav Pandit
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 3/8] device-context: Define the device context fields for device migration Parav Pandit
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 4/8] admin: Add device migration admin commands Parav Pandit
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 5/8] admin: Add requirements of device migration commands Parav Pandit
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 6/8] admin: Add theory of operation for write recording commands Parav Pandit
2023-10-31 1:43 ` [virtio-comment] " Jason Wang
2023-10-31 3:27 ` [virtio-comment] " Parav Pandit
2023-10-31 7:45 ` [virtio-comment] " Michael S. Tsirkin
2023-10-31 9:32 ` Zhu, Lingshan
2023-10-31 9:41 ` Michael S. Tsirkin
2023-10-31 9:47 ` Zhu, Lingshan
2023-11-01 0:29 ` Jason Wang
2023-11-01 3:02 ` [virtio-comment] " Parav Pandit
2023-11-02 4:24 ` [virtio-comment] " Jason Wang
2023-11-02 6:10 ` [virtio-comment] " Parav Pandit
2023-11-06 6:34 ` [virtio-comment] " Jason Wang
2023-11-06 6:53 ` [virtio-comment] " Parav Pandit
2023-11-07 4:04 ` [virtio-comment] " Jason Wang
2023-11-07 7:05 ` Michael S. Tsirkin
2023-11-08 4:28 ` Jason Wang
2023-11-08 8:17 ` Michael S. Tsirkin
2023-11-08 9:00 ` [virtio-comment] " Parav Pandit
2023-11-08 17:16 ` [virtio-comment] " Michael S. Tsirkin
2023-11-09 6:27 ` Parav Pandit
2023-11-09 3:31 ` Jason Wang
2023-11-09 7:59 ` Michael S. Tsirkin
2023-11-10 6:46 ` [virtio-comment] " Parav Pandit
2023-11-13 3:41 ` [virtio-comment] " Jason Wang
2023-11-13 14:30 ` Michael S. Tsirkin
2023-11-14 2:03 ` Zhu, Lingshan
2023-11-14 7:52 ` Jason Wang
2023-11-15 17:37 ` [virtio-comment] " Parav Pandit
2023-11-16 4:24 ` [virtio-comment] " Jason Wang
2023-11-16 6:49 ` Michael S. Tsirkin
2023-11-21 4:21 ` Jason Wang
2023-11-21 16:24 ` [virtio-comment] " Parav Pandit
2023-11-22 4:11 ` [virtio-comment] " Jason Wang
2023-11-16 6:50 ` Michael S. Tsirkin
2023-11-13 3:31 ` Jason Wang
2023-11-13 6:57 ` Michael S. Tsirkin
2023-11-14 7:34 ` Zhu, Lingshan
2023-11-14 7:59 ` Jason Wang
2023-11-14 8:27 ` Michael S. Tsirkin
2023-11-15 4:05 ` Zhu, Lingshan
2023-11-15 7:51 ` Michael S. Tsirkin
2023-11-15 7:59 ` Zhu, Lingshan
2023-11-15 8:05 ` Michael S. Tsirkin
2023-11-15 8:42 ` Zhu, Lingshan
2023-11-15 11:52 ` Michael S. Tsirkin
2023-11-16 9:38 ` Zhu, Lingshan
2023-11-16 12:18 ` Michael S. Tsirkin
2023-11-17 9:50 ` Zhu, Lingshan
2023-11-17 9:55 ` Michael S. Tsirkin [this message]
2023-11-14 7:57 ` Jason Wang
2023-11-14 9:16 ` Michael S. Tsirkin
2023-11-15 17:42 ` [virtio-comment] " Parav Pandit
2023-11-16 4:18 ` [virtio-comment] " Jason Wang
2023-11-16 5:27 ` [virtio-comment] " Parav Pandit
2023-11-17 10:15 ` [virtio-comment] " Michael S. Tsirkin
2023-11-17 10:48 ` Parav Pandit
2023-11-17 11:19 ` Michael S. Tsirkin
2023-11-17 11:32 ` Parav Pandit
2023-11-17 11:49 ` Michael S. Tsirkin
2023-11-17 12:15 ` Parav Pandit
2023-11-17 12:37 ` Michael S. Tsirkin
2023-11-17 12:49 ` Parav Pandit
2023-11-17 13:58 ` Michael S. Tsirkin
2023-11-17 14:49 ` Parav Pandit
2023-11-17 15:00 ` Michael S. Tsirkin
2023-11-09 6:26 ` [virtio-comment] " Parav Pandit
2023-11-15 7:59 ` [virtio-comment] " Michael S. Tsirkin
2023-11-15 17:42 ` [virtio-comment] " Parav Pandit
2023-11-09 6:24 ` Parav Pandit
2023-11-13 3:37 ` [virtio-comment] " Jason Wang
2023-11-15 17:38 ` [virtio-comment] " Parav Pandit
2023-11-16 4:23 ` [virtio-comment] " Jason Wang
2023-11-16 5:29 ` [virtio-comment] " Parav Pandit
2023-11-16 5:51 ` [virtio-comment] " Michael S. Tsirkin
2023-11-16 7:35 ` Michael S. Tsirkin
2023-11-16 7:40 ` [virtio-comment] " Parav Pandit
2023-11-16 11:48 ` [virtio-comment] " Michael S. Tsirkin
2023-11-16 16:26 ` [virtio-comment] " Parav Pandit
2023-11-16 17:25 ` [virtio-comment] " Michael S. Tsirkin
2023-11-16 17:29 ` [virtio-comment] " Parav Pandit
2023-11-16 18:20 ` [virtio-comment] " Michael S. Tsirkin
2023-11-17 3:02 ` [virtio-comment] " Parav Pandit
2023-11-17 8:46 ` [virtio-comment] " Michael S. Tsirkin
2023-11-17 9:14 ` [virtio-comment] " Parav Pandit
2023-11-17 9:37 ` [virtio-comment] " Michael S. Tsirkin
2023-11-17 9:41 ` [virtio-comment] " Parav Pandit
2023-11-17 9:44 ` Parav Pandit
2023-11-17 9:51 ` [virtio-comment] " Michael S. Tsirkin
2023-11-17 9:54 ` Zhu, Lingshan
2023-11-17 10:02 ` Michael S. Tsirkin
2023-11-17 10:10 ` Parav Pandit
2023-11-17 9:57 ` Parav Pandit
2023-11-17 10:37 ` Michael S. Tsirkin
2023-11-17 10:52 ` Parav Pandit
2023-11-17 11:32 ` Michael S. Tsirkin
2023-11-17 12:22 ` Parav Pandit
2023-11-17 12:40 ` Michael S. Tsirkin
2023-11-17 12:51 ` Parav Pandit
2023-11-21 5:16 ` Jason Wang
2023-11-21 16:29 ` Parav Pandit
2023-11-21 21:00 ` Michael S. Tsirkin
2023-11-22 3:46 ` Parav Pandit
2023-11-22 7:44 ` Michael S. Tsirkin
2023-11-22 4:17 ` Jason Wang
2023-11-22 4:34 ` Parav Pandit
2023-11-24 3:15 ` Jason Wang
2023-11-17 9:52 ` Zhu, Lingshan
2023-11-17 9:59 ` [virtio-comment] " Parav Pandit
2023-11-17 10:00 ` [virtio-comment] " Zhu, Lingshan
2023-11-21 4:24 ` Jason Wang
2023-11-21 16:26 ` [virtio-comment] " Parav Pandit
2023-11-22 4:14 ` [virtio-comment] " Jason Wang
2023-11-22 4:19 ` [virtio-comment] " Parav Pandit
2023-11-24 3:09 ` [virtio-comment] " Jason Wang
2023-11-16 10:28 ` Zhu, Lingshan
2023-11-16 11:59 ` Michael S. Tsirkin
2023-11-17 9:59 ` Zhu, Lingshan
2023-11-17 10:03 ` Parav Pandit
2023-11-17 11:00 ` Michael S. Tsirkin
2023-11-17 11:05 ` Parav Pandit
2023-11-17 11:33 ` Michael S. Tsirkin
2023-11-17 11:45 ` Parav Pandit
2023-11-17 12:04 ` Michael S. Tsirkin
2023-11-17 12:11 ` Parav Pandit
2023-11-17 12:32 ` Michael S. Tsirkin
2023-11-17 13:03 ` Parav Pandit
2023-11-17 14:00 ` Michael S. Tsirkin
2023-11-17 14:48 ` Parav Pandit
2023-11-17 14:59 ` Michael S. Tsirkin
2023-11-21 6:55 ` Jason Wang
2023-11-21 16:30 ` Parav Pandit
2023-11-22 4:19 ` Jason Wang
2023-11-22 4:28 ` Parav Pandit
2023-11-24 3:08 ` Jason Wang
2023-11-22 2:31 ` Si-Wei Liu
2023-11-22 5:31 ` Jason Wang
2023-11-23 13:19 ` Si-Wei Liu
2023-11-23 14:39 ` Michael S. Tsirkin
2023-11-24 2:29 ` Jason Wang
2023-11-28 3:00 ` Si-Wei Liu
2023-11-29 5:12 ` Jason Wang
2023-11-17 10:40 ` Michael S. Tsirkin
2023-11-21 4:23 ` Jason Wang
2023-11-21 7:14 ` Jason Wang
2023-11-21 16:31 ` [virtio-comment] " Parav Pandit
2023-11-22 4:28 ` [virtio-comment] " Jason Wang
2023-11-22 6:41 ` [virtio-comment] " Parav Pandit
2023-11-24 3:06 ` [virtio-comment] " Jason Wang
2023-11-15 7:58 ` Michael S. Tsirkin
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 7/8] admin: Add " Parav Pandit
2023-10-30 13:19 ` [virtio-comment] [PATCH v3 8/8] admin: Add requirements of write reporting commands Parav Pandit
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=20231117045200-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=cohuck@redhat.com \
--cc=jasowang@redhat.com \
--cc=lingshan.zhu@intel.com \
--cc=maorg@nvidia.com \
--cc=parav@nvidia.com \
--cc=sburla@marvell.com \
--cc=shahafs@nvidia.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=yishaih@nvidia.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.