introduce basic facilities for virito live migration
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
In reply to Parav PanditQuoted 89 lines · Parav Pandit
Quoted 89 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 12:23 PMQuoted 18 lines · Michael S. Tsirkin
Quoted 17 lines · Lingshan
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Lingshan
Quoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: [email protected] <[email protected] open.org> On Behalf Of Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Parav Pandit
Quoted 5 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration
structure to support VIRTIO_F_QUEUE_STATE in PCI transportlayer.
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)diff --git a/transport-pci.tex b/transport-pci.tex index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only for driver*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for driver
*/
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, doesnot work effectively.
Quoted 2 lines
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.Do you know there is a
queue_select? Why this does not work? Do you know how other queue related fields work?Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors +
more.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically
via this one vq at a time, serializing all the operations.
Quoted 10 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
I wish we just had a transport vq already. That's the way to solve this not fighting individual bits.
Yeah, I agree, transport is a queued task(sent out V4 months ago...), one by one... hard and tough work...
Frankly I think that should take precedence, then Parav will not get annoyed each time add a couple of registers.
Quoted 8 lines
Quoted 1 line
I agree, things can happen and we are already here..
Unfortunately transport vq is of not much help for below fundamental reasons.
1.1 as it involves many VMEXITS of accessing runtime config spaced on slow registers.
1.2 or alternatively hypervisor end up polling may thousands of registers wasting cpu resources.
2. It does not help of future CC use case where hypervisor must not be involved in dynamic config
3. Complex device like vnet has already stopped using every growing config space and using cvq, large part of work in 1.3 has shown that already
4. PFs also cannot infinitely grow registers, they also need less on-die registers.
You miss the point here. Nothing makes transport vq different from what you proposed here (especially the device context part).
Quoted 2 lines
And who knows the backward compatible SIOV devices may offer same bar as VFs.
Another self-contradictory, isn't it? You claim the bar is not scalable, but you still want to offer a bar for SIOV?
Quoted 2 lines
virto spec has already outlined this efficient concept in the spec and TC members are already following it.
Another shifting concept. Admin commands/virtqueues makes sense doesn't mean you can simply layer everything on top.
What's more, Spec can't be 100% correct, that's why there are fixes or even revert.
Quoted 2 lines
SIOV for non-backward compatible mode, anyway, need new interface and vq is inherently already there which fulfilling the needs.
What interface did you mean here? How much does it differ from the transport virtqueue?
Again, if you keep raising unrelated topics like CC or TDISP, the discussion won't converge. And you are self-contradicting that you still haven't explained why your proposal can work in those cases.
Thanks
Quoted 35 lines
Quoted 35 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
the driver need to initialize them anyway.
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 20 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 16 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allqueues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
You didn't answer the question, does the spec even has defined "create a vq"?
Quoted 2 lines
Quoted 2 lines
For standard virtio, you need to read the number of enabled vqs at the source side, then enable them at the dst, so
queue_sizematters,not to create.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
All that happens in the pre-copy phase.
Yes and how your answer related to this discussion?
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 109 lines · Jason Wang
Quoted 86 lines · Parav Pandit
Quoted 86 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 12:23 PMQuoted 17 lines · Michael S. Tsirkin
Quoted 16 lines · Lingshan
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Lingshan
Quoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Parav Pandit
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration
structure to support VIRTIO_F_QUEUE_STATE in PCI transportlayer.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)diff --git a/transport-pci.tex b/transport-pci.tex index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only for driver*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for driver
*/
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does not work?
Do you know how other queue related fields work?Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors +
more.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically
via this one vq at a time, serializing all the operations.
Quoted 10 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
I wish we just had a transport vq already. That's the way to solve this not fighting individual bits.
Yeah, I agree, transport is a queued task(sent out V4 months ago...), one by one... hard and tough work...
Frankly I think that should take precedence, then Parav will not get annoyed each time add a couple of registers.
Quoted 8 lines
Quoted 1 line
I agree, things can happen and we are already here..
Unfortunately transport vq is of not much help for below fundamental reasons.
1.1 as it involves many VMEXITS of accessing runtime config spaced on slow registers.
1.2 or alternatively hypervisor end up polling may thousands of registers wasting cpu resources.
2. It does not help of future CC use case where hypervisor must not be involved in dynamic config
3. Complex device like vnet has already stopped using every growing config space and using cvq, large part of work in 1.3 has shown that already
4. PFs also cannot infinitely grow registers, they also need less on-die registers.You miss the point here. Nothing makes transport vq different from what you proposed here (especially the device context part).
Quoted 1 line
And who knows the backward compatible SIOV devices may offer same bar as VFs.
Another self-contradictory, isn't it? You claim the bar is not scalable, but you still want to offer a bar for SIOV?
Quoted 1 line
virto spec has already outlined this efficient concept in the spec and TC members are already following it.
Another shifting concept. Admin commands/virtqueues makes sense doesn't mean you can simply layer everything on top.
What's more, Spec can't be 100% correct, that's why there are fixes or even revert.
Quoted 7 lines
Quoted 1 line
SIOV for non-backward compatible mode, anyway, need new interface and vq is inherently already there which fulfilling the needs.
What interface did you mean here? How much does it differ from the transport virtqueue?
Again, if you keep raising unrelated topics like CC or TDISP, the discussion won't converge. And you are self-contradicting that you still haven't explained why your proposal can work in those cases.
I agree with Jason on his replies.
Quoted 45 lines
Thanks
Quoted 40 lines
Quoted 40 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
the driver need to initialize them anyway.
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 12 lines
Quoted 12 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allqueues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a vq"?
Quoted 2 lines
Quoted 2 lines
For standard virtio, you need to read the number of enabled vqs at the source side, then enable them at the dst, so
queue_sizematters,not to create.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
All that happens in the pre-copy phase.
Yes and how your answer related to this discussion?
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
In reply to Jason WangQuoted 109 lines
From: Jason Wang <[email protected]>
Sent: Monday, November 13, 2023 9:17 AMQuoted 89 lines · Parav Pandit
Quoted 89 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 12:23 PMQuoted 18 lines · Michael S. Tsirkin
Quoted 17 lines · Lingshan
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Lingshan
Quoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Parav Pandit
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 7 lines
Quoted 7 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Common
configurationstructure
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only for driver*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for driver
*/
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does not work?
Do you know how other queue related fields work?Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors +
more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically
via this one vq at a time, serializing all the operations.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
I wish we just had a transport vq already. That's the way to solve this not fighting individual bits.
Yeah, I agree, transport is a queued task(sent out V4 months ago...), one by one... hard and tough work...
Frankly I think that should take precedence, then Parav will not get annoyed each time add a couple of registers.
I agree, things can happen and we are already here..
Unfortunately transport vq is of not much help for below fundamental
reasons.
Quoted 2 lines
1.1 as it involves many VMEXITS of accessing runtime config spaced on slow
registers.
Quoted 1 line
1.2 or alternatively hypervisor end up polling may thousands of registers
wasting cpu resources.
Quoted 9 lines
Quoted 3 lines
2. It does not help of future CC use case where hypervisor must not be involved in dynamic config 3. Complex device like vnet has already stopped using every growing config space and using cvq, large part of work in
1.3 has shown that already 4. PFs also cannot infinitely grow registers, they also need less on-die registers.
You miss the point here. Nothing makes transport vq different from what you proposed here (especially the device context part).
It does.
Device context on read only reports delta. For transport via MMIO or VQ, reads/write what is asked.
The second functional difference is:
Transport VQ when present on the member device itself, it further makes the communication secure from the hypervisor. 3rd is: it eliminates above 1 to 4 isssues.
Quoted 8 lines
Quoted 2 lines
And who knows the backward compatible SIOV devices may offer same bar as
VFs.
Another self-contradictory, isn't it? You claim the bar is not scalable, but you still want to offer a bar for SIOV?
Quoted 1 line
Quoted 6 lines
Quoted 1 line
virto spec has already outlined this efficient concept in the spec and TC
members are already following it.
Another shifting concept. Admin commands/virtqueues makes sense doesn't mean you can simply layer everything on top.
Not at all. Using CVQ for non init work is existing concept since 2014. No need to prove again.
Quoted 2 lines
What's more, Spec can't be 100% correct, that's why there are fixes or even revert.
In this aspect it is correct and all the recent work is rightly following it too.
Quoted 7 lines
Quoted 3 lines
SIOV for non-backward compatible mode, anyway, need new interface and vq
is inherently already there which fulfilling the needs.
What interface did you mean here? How much does it differ from the transport virtqueue?
No point for me to deviate the discussion here. It is meaningless to invent SIOV when we are still making VF migration to work. What I know is, non-backward compat mode does not need giant PCI registers that we have today.
Quoted 5 lines
Again, if you keep raising unrelated topics like CC or TDISP, the discussion won't converge. And you are self-contradicting that you still haven't explained why your proposal can work in those cases.
The fundamental point are:
1. it does not build on a volatile concept of involving hypervisor as listed in TDISP for driver to member device communication.
2. it provides a unified interface for PF, VF, SIOV.
Quoted 49 lines
Thanks
Quoted 45 lines
Quoted 44 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 14 lines
Quoted 14 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allqueues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a vq"?
Quoted 3 lines
Quoted 3 lines
For standard virtio, you need to read the number of enabled vqs at the source side, then enable them at the dst, so
queue_sizematters,not to create.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
All that happens in the pre-copy phase.
Yes and how your answer related to this discussion?
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
In reply to Zhu, LingshanQuoted 62 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 57 lines · Parav Pandit
Quoted 57 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 44 lines · Parav Pandit
Quoted 44 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 16 lines · Parav Pandit
Quoted 16 lines
From: [email protected] <[email protected] open.org> On Behalf Of Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 11 lines · Parav Pandit
Quoted 11 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration structure to support
VIRTIO_F_QUEUE_STATEin PCI transport layer.Signed-off-by Zhu Lingshan <[email protected]>--- transport-pci.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
transport-pci.tex \subsubsection{Common configuration
Quoted 5 lines
transport-pci.tex index renamed from transport-pci.tex +0
-0a5c6719..3161519 100644
transport-pci.tex +0
-0@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 18 lines
Quoted 10 lines
Quoted 10 lines
transport-pci.tex
Quoted 8 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16admin_queue_index; /* read-only for driver */
le16admin_queue_num; /* read-only for driver */transport-pci.tex +4
-0+ + /* Virtqueue state */ + le16 queue_avail_state; /* read-write */ + le16 queue_used_state; /* read-write */This tiny interface for 128 virtio net queues through register read writes, does
Quoted 5 lines
not work effectively.
Quoted 2 lines
There are inflight out of order descriptors for block also. Hence toy registers like this do not work.
Do you know there is a
queue_select? Why this does not work? Do you know how other queue related fields work?:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itQuoted 7 lines
Quoted 5 lines
was introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors + more. interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800G affect??
Quoted 8 lines
Quoted 3 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic that gets lost. This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending packets. Hence it is different from driver init time queue enable.
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
Quoted 23 lines
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this mechanism? Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as all
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a vq"?
Enabled/created = tomato/tomato when discussing the spec in non-normative email conversation. It's irrelevant.
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 6 lines · Parav Pandit
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
The registers are control path in config space, how 400G or 800G affect??
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
Quoted 8 lines
Quoted 3 lines
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic that gets lost. This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending packets. Hence it is different from driver init time queue enable.
Maybe but I think not qualitatively different.
If you care about these things please provide some estimates. I just don't see how queue resume writes even with 64k queues will saturate an express link.
Quoted 36 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
Quoted 29 lines
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this mechanism? Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 17 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allqueues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.
Quoted 7 lines
Quoted 1 line
You didn't answer the question, does the spec even has defined "create a vq"?
Enabled/created = tomato/tomato when discussing the spec in non-normative email conversation. It's irrelevant.
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
we really do not need to prematurely optimize all things. control path is control path it is going to be slow because virtio designed it to be slow and drivers don't optimize it. Shaving off a microsecond here or there is going to do nothing except increase maintainance costs.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 19 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, November 9, 2023 2:12 PMQuoted 11 lines · Parav Pandit
Quoted 10 lines
Quoted 5 lines
Quoted 1 line
The registers are control path in config space, how 400G or 800G affect??
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network yet.
Quoted 9 lines
Quoted 1 line
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
Maybe but I think not qualitatively different.
If you care about these things please provide some estimates.
I just don't see how queue resume writes even with 64k queues will saturate an express link.
It is not the bw of the link.
It is how the need for the device to be always read to suspend those many queues through register interface.
Quoted 47 lines
Quoted 16 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 15 lines
Quoted 15 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 4 lines
It's irrelevant.
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 8 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
we really do not need to prematurely optimize all things.
control path is control path it is going to be slow because virtio designed it to be slow and drivers don't optimize it.
Shaving off a microsecond here or there is going to do nothing except increase maintainance costs.
Control path post device initialization for large part is through the cvq.
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 23 lines · Parav Pandit
Quoted 23 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, November 9, 2023 2:12 PMQuoted 11 lines · Parav Pandit
Quoted 10 lines
Quoted 5 lines
Quoted 1 line
The registers are control path in config space, how 400G or 800G affect??
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 3 lines
This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
Quoted 7 lines
Quoted 5 lines
Maybe but I think not qualitatively different.
If you care about these things please provide some estimates.
I just don't see how queue resume writes even with 64k queues will saturate an express link.It is not the bw of the link.
It is how the need for the device to be always read to suspend those many queues through register interface.
read->ready?
If we want to we can solve it btw. Prohibit changing queue select while suspend is in progress.
But more importantly once Zhu Lingshan stops arguing about suspend bit he'll hopefully work on transport vq. Then we can have it in config space and at the same time not use up a register.
Quoted 50 lines
Quoted 50 lines
Quoted 16 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 15 lines
Quoted 15 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 4 lines
It's irrelevant.
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
Quoted 7 lines
Quoted 5 lines
we really do not need to prematurely optimize all things.
control path is control path it is going to be slow because virtio designed it to be slow and drivers don't optimize it.
Shaving off a microsecond here or there is going to do nothing except increase maintainance costs.Control path post device initialization for large part is through the cvq.
Really depends on the device. For virtio net most of the time is spent on filling up receive queues and sending network announcements and such.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 45 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, November 9, 2023 3:23 PM
To: Parav Pandit <[email protected]>
Cc: Zhu, Lingshan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; virtio- [email protected]
Subject: Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implementVIRTIO_F_QUEUE_STATEQuoted 6 lines · Parav Pandit
Quoted 6 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Thursday, November 9, 2023 2:12 PMQuoted 1 line · Parav Pandit
Quoted 1 line
Quoted 1 line
Quoted 1 line
The registers are control path in config space, how 400G or 800G
affect??
Quoted 18 lines
Quoted 18 lines
Quoted 11 lines
Quoted 9 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 3 lines
This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
Quoted 7 lines
Quoted 5 lines
Maybe but I think not qualitatively different.
If you care about these things please provide some estimates. I just don't see how queue resume writes even with 64k queues will saturate an express link.It is not the bw of the link.
It is how the need for the device to be always read to suspend those manyqueues through register interface.
Quoted 8 lines
read->ready?If we want to we can solve it btw. Prohibit changing queue select while suspend is in progress.
But more importantly once Zhu Lingshan stops arguing about suspend bit he'll hopefully work on transport vq. Then we can have it in config space and at the same time not use up a register.
Transport vq on the owner device for long term does not make sense as hypervisor should not be involved in viewing this content from TDISP time. So cvq of whatever vq we want to call from the member device will be just perfect.
And it will behave like any other queues.
This will be uniformly available for VF, SIOV, PF devices regardless of TDISP and with TDISP.
This solves both the scale issue and security issue.
Hence 3 solutions,
1. transport vq for VF using owner device for purpose of device migration
2. not using it and inventing another VQ for TDISP in future and for PF, VF, SIOV and TDISP is overkill.
All the operations of the live migration driver like suspend device or others, seems doable just fine using owner device. What is missing?
Quoted 62 lines
Quoted 62 lines
Quoted 61 lines
Quoted 19 lines
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 15 lines
Quoted 15 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 3 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 5 lines
It's irrelevant.
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
we really do not need to prematurely optimize all things. control path is control path it is going to be slow because virtio designed it to be slow and drivers don't optimize it. Shaving off a microsecond here or there is going to do nothing except increase maintainance costs.
Quoted 4 lines
Quoted 1 line
Control path post device initialization for large part is through the cvq.
Really depends on the device. For virtio net most of the time is spent on filling up receive queues and sending network announcements and such.
Right for the time. But the issue is not about the time spent.
Issue is for the demand of those registers which are of no use when filling large part of filling receive queues.
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
In reply to Parav PanditQuoted 66 lines · Parav Pandit
Quoted 66 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 53 lines · Parav Pandit
Quoted 53 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 49 lines · Parav Pandit
Quoted 49 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 16 lines · Parav Pandit
Quoted 16 lines
From: [email protected] <[email protected] open.org> On Behalf Of Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 11 lines · Parav Pandit
Quoted 11 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration structure to support
VIRTIO_F_QUEUE_STATEin PCI transport layer.Signed-off-by Zhu Lingshan <[email protected]>--- transport-pci.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
transport-pci.tex \subsubsection{Common configuration
Quoted 5 lines
transport-pci.tex index renamed from transport-pci.tex +0
-0a5c6719..3161519 100644
transport-pci.tex +0
-0@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
transport-pci.tex
Quoted 8 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16admin_queue_index; /* read-only for driver */
le16admin_queue_num; /* read-only for driver */transport-pci.tex +4
-0+ + /* Virtqueue state */ + le16 queue_avail_state; /* read-write */ + le16 queue_used_state; /* read-write */This tiny interface for 128 virtio net queues through register read writes, does
Quoted 8 lines
Quoted 5 lines
not work effectively.
Quoted 2 lines
There are inflight out of order descriptors for block also. Hence toy registers like this do not work.
Do you know there is a
queue_select? Why this does not work? Do you know how other queue related fields work?:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors + more. interesting, virtio work in this pattern for many years, right?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800G affect??Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
Quoted 8 lines
Quoted 3 lines
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic that gets lost. This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending packets. Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination side.
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 23 lines
Quoted 23 lines
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this mechanism? Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allqueues must be created before the
driver_okphase.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a vq"?
Enabled/created = tomato/tomato when discussing the spec in non-normative email conversation. It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 2 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
I don't want to repeat why I don't think admin vq is a good idea for migration again, we have already discussed on that.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 76 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 71 lines · Parav Pandit
Quoted 71 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 54 lines · Parav Pandit
Quoted 54 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 50 lines · Parav Pandit
Quoted 50 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: [email protected] <[email protected] open.org> On Behalf Of Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 11 lines · Parav Pandit
Quoted 11 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration structure to support
VIRTIO_F_QUEUE_STATEin PCI transport layer.Signed-off-by Zhu Lingshan <[email protected]>--- transport-pci.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
transport-pci.tex \subsubsection{Common configuration
Quoted 5 lines
transport-pci.tex index renamed from transport-pci.tex +0
-0a5c6719..3161519 100644
transport-pci.tex +0
-0@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
transport-pci.tex
Quoted 8 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16admin_queue_index; /* read-only for driver */
le16admin_queue_num; /* read-only for driver */transport-pci.tex +4
-0+ + /* Virtqueue state */ + le16 queue_avail_state; /* read-write */ + le16 queue_used_state; /* read-write */This tiny interface for 128 virtio net queues through register read writes, does
Quoted 8 lines
Quoted 5 lines
not work effectively.
Quoted 2 lines
There are inflight out of order descriptors for block also. Hence toy registers like this do not work.
Do you know there is a
queue_select? Why this does not work? Do you know how other queue related fields work?:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors + more. interesting, virtio work in this pattern for many years, right?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800G affect??Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
Quoted 8 lines
Quoted 1 line
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 3 lines
This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination side.
I think it can.
Because there is no notification of member device link down intimation to remote side.
The L4 and L5 protocols have no knowledge that node which they are interacting is behind some layers of switches.
So keeping this time low is desired.
Quoted 41 lines
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 1 line
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 9 lines
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 2 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to enable SR-IOV in [1]. This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work using [1].
[1] https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offload-on-virtual-machines.html
Quoted 3 lines
I don't want to repeat why I don't think admin vq is a good idea for migration again, we have already discussed on that.
Quoted 1 line
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 81 lines · Parav Pandit
Quoted 81 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 64 lines · Parav Pandit
Quoted 64 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 60 lines · Parav Pandit
Quoted 50 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 46 lines · Parav Pandit
Quoted 46 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: [email protected] <[email protected] open.org> On Behalf Of Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 11 lines · Parav Pandit
Quoted 11 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration structure to support
VIRTIO_F_QUEUE_STATEin PCI transport layer.Signed-off-by Zhu Lingshan <[email protected]>--- transport-pci.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
transport-pci.tex \subsubsection{Common configuration
Quoted 5 lines
transport-pci.tex index renamed from transport-pci.tex +0
-0a5c6719..3161519 100644
transport-pci.tex +0
-0@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
transport-pci.tex
Quoted 8 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16admin_queue_index; /* read-only for driver */
le16admin_queue_num; /* read-only for driver */transport-pci.tex +4
-0+ + /* Virtqueue state */ + le16 queue_avail_state; /* read-write */ + le16 queue_used_state; /* read-write */This tiny interface for 128 virtio net queues through register read writes, does
Quoted 8 lines
Quoted 5 lines
not work effectively.
Quoted 2 lines
There are inflight out of order descriptors for block also. Hence toy registers like this do not work.
Do you know there is a
queue_select? Why this does not work? Do you know how other queue related fields work?:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors + more. interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800G affect??Because those are the one in practice requires large number of VQs.
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 3 lines
This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending
Quoted 8 lines
Quoted 3 lines
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination side.
I think it can.
Because there is no notification of member device link down intimation to remote side.
The L4 and L5 protocols have no knowledge that node which they are interacting is behind some layers of switches.So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to it.
This is necessary, for example VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.
This is out of the topic anyway.
Quoted 49 lines
Quoted 40 lines
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 1 line
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 9 lines
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 2 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio.
PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
Quoted 6 lines
There was a recent work done emulating the SR-IOV cap and allowing VM to enable SR-IOV in [1]. This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work using [1].
[1] https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offload-on-virtual-machines.html
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one problem.
Quoted 3 lines
Quoted 3 lines
I don't want to repeat why I don't think admin vq is a good idea for migration again, we have already discussed on that.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 169 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: [email protected] <[email protected] open.org> On Behalf Of Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Parav Pandit
Quoted 5 lines
Quoted 5 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration
structure to support VIRTIO_F_QUEUE_STATE in PCI transportlayer.
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)diff --git a/transport-pci.tex b/transport-pci.tex index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only for driver*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for driver
*/
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines
Quoted 4 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */This tiny interface for 128 virtio net queues through register read writes, does
not work effectively.
Quoted 2 lines
There are inflight out of order descriptors for block also. Hence toy registers like this do not work.
Do you know there is a
queue_select? Why this does not work? Do you know how other queue related fields work?Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors +
more.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
Quoted 7 lines
Quoted 7 lines
that gets lost.
Quoted 3 lines
This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 2 lines
I think it can.
Because there is no notification of member device link down intimation toremote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 2 lines
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to it.
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 49 lines
Quoted 49 lines
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 6 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 2 lines
This is the option I mentioned few weeks ago.
Quoted 8 lines
Quoted 1 line
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 4 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offload-o
n-virtual-machines.htmlWe should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one problem.
Sure, until that point the admin commands are able to suffice the need well.
And when the spec changes in transport occurs (if needed), current admin command and admin vq also fits very well that will follow above [1].
Thanks.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
I don't want to repeat why I don't think admin vq is a good idea for migration again, we have already discussed on that.
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 166 lines · Parav Pandit
Quoted 166 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: [email protected] <[email protected] open.org> On Behalf Of Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Parav Pandit
Quoted 5 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common configuration
structure to support VIRTIO_F_QUEUE_STATE in PCI transportlayer.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)diff --git a/transport-pci.tex b/transport-pci.tex index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Common configurationstructure
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only for driver*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for driver
*/
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, doesnot work effectively.
Quoted 2 lines
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.Do you know there is a
queue_select? Why this does not work? Do you know how other queue related fields work?Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors +
more.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
Quoted 7 lines
Quoted 7 lines
that gets lost.
Quoted 3 lines
This is because the interface is not yet up and not part of the network yet.
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 2 lines
I think it can.
Because there is no notification of member device link down intimation toremote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to it.
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 6 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 3 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
Quoted 8 lines
Quoted 6 lines
using [1].
Quoted 3 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offload-o
n-virtual-machines.htmlWe should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one problem.
Sure, until that point the admin commands are able to suffice the need well.
And when the spec changes in transport occurs (if needed), current admin command and admin vq also fits very well that will follow above [1].
we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
Quoted 4 lines
Thanks.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
I don't want to repeat why I don't think admin vq is a good idea for migration again, we have already discussed on that.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 188 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 5 lines · Parav Pandit
Quoted 5 lines
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Parav Pandit
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
diff --git a/transport-pci.tex b/transport-pci.tex index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 39 lines
Quoted 39 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
Quoted 3 lines
Quoted 3 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only for driver*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for driver
*/
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does not work?
Do you know how other queue related fields work?Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
:)
Yes. If you noticequeue_resetrelated critical spec bug fix was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When
queue_selectis done for 128 queues serially, it take a lot of time toread those slow register interface for this + inflight descriptors +
more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 1 line
This is because the interface is not yet up and not part of the network
yet.
Quoted 86 lines
Quoted 86 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toremote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to it.
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Like how to set a queue size and enable it?
Those are meant to be used before
DRIVER_OKstage as they are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 4 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offload
-o
n-virtual-machines.html
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 2 lines
Sure, until that point the admin commands are able to suffice the need well. And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
I don’t see any.
Nested is already solved using above.
Long time ago, you mentioned some QoS issue, which anyway exists in the device register method too. Can you please list them if anything other than QoS and nest?
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 188 lines · Parav Pandit
Quoted 188 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMQuoted 5 lines · Parav Pandit
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
diff --git a/transport-pci.tex b/transport-pci.tex index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 39 lines
Quoted 39 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
Quoted 3 lines
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only for driver*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for driver
*/
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does not work?
Do you know how other queue related fields work?Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
:)
Yes. If you notice queue_reset related critical spec bug fix
was done when itwas introduced so that live migration can _actually_ work.
Quoted 2 lines
When queue_select is done for 128 queues serially, it take a
lot of time toread those slow register interface for this + inflight descriptors +
more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 1 line
This is because the interface is not yet up and not part of the network
yet.
Quoted 87 lines
Quoted 87 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toremote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to it.
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as they
are init timeregisters.
Quoted 1 line
Not to keep abusing them..
don't you need to set
queue_sizeat the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 4 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offload
-o
n-virtual-machines.htmlWe should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
Quoted 8 lines
Quoted 6 lines
problem.
Quoted 2 lines
Sure, until that point the admin commands are able to suffice the need well. And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
I don’t see any.
Nested is already solved using above.
I don't see how, do you mind to work out the patches?
Quoted 2 lines
Long time ago, you mentioned some QoS issue, which anyway exists in the device register method too. Can you please list them if anything other than QoS and nest?
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 205 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 54 lines · Parav Pandit
Quoted 54 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only fordriver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for
driver
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
*/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does notwork?
Quoted 42 lines
Quoted 42 lines
Quoted 23 lines
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec bug
fix was done when it
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially, it take
a lot of time to
read those slow register interface for this + inflight
descriptors +more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present, number of
queues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
remote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 71 lines
Quoted 71 lines
Quoted 71 lines
Quoted 71 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as they
are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?No.
But the src/dst does not matter.Queue_sizeto be set beforeDRIVER_OKlike rest of the registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_resetwas last moment exception.create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 5 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offlo
ad
-o
n-virtual-machines.htmlQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 1 line
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
I don’t see any.
Nested is already solved using above.I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed.
I wont be able to work on the patches for it until we finish for the first level virtualization.
Quoted 3 lines
Quoted 1 line
Long time ago, you mentioned some QoS issue, which anyway exists in the
device register method too.
Quoted 1 line
Can you please list them if anything other than QoS and nest?
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 204 lines · Parav Pandit
Quoted 204 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 53 lines · Parav Pandit
Quoted 53 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMQuoted 9 lines · Parav Pandit
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only fordriver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for
driver
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
*/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does notwork?
Quoted 42 lines
Quoted 42 lines
Quoted 23 lines
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec bug
fix was done when it
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially, it take
a lot of time to
read those slow register interface for this + inflight
descriptors +more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present,
number ofqueues were not in hw.
The registers are control path in config space, how 400G or 800Gaffect??
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
remote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of vqs is there,
num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving
and expandingthem.
Quoted 1 line
So all these years do not matter.
Not sure what are you talking about, haven't we initialize the device and vqs in config space for years?????? What's wrong with this
mechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as they
are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?
No.
But the src/dst does not matter.
Queue_size to be set before DRIVER_OK like rest of the
registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the
driver_okphase.Quoted 1 line
Queue_reset was last moment exception.
create a queue? Nvidia specific?
Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 5 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offlo
ad
-o
n-virtual-machines.htmlQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 1 line
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
I don’t see any.
Nested is already solved using above.I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed.
I wont be able to work on the patches for it until we finish for the first level virtualization.
As you know, nested is supported well in current virtio, so please don't break it.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Long time ago, you mentioned some QoS issue, which anyway exists in the
device register method too.
Quoted 1 line
Can you please list them if anything other than QoS and nest?
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 227 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 17, 2023 3:32 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implementVIRTIO_F_QUEUE_STATEQuoted 87 lines · Parav Pandit
Quoted 87 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 53 lines · Parav Pandit
Quoted 53 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMOn 11/6/2023 12:12 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of
Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support
VIRTIO_F_QUEUE_STATE in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only fordriver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for
driver
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
*/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does notwork?
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec bug
fix was done when it
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially, it
take a lot of time to
read those slow register interface for this + inflight
descriptors +more.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not
present, number of
queues were not in hw.
The registers are control path in config space, how 400G or
800Gaffect??
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Because those are the one in practice requires large number of
VQs.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and
RESUME.
Quoted 42 lines
Quoted 42 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
remote side.
Quoted 2 lines
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of
vqs is there, num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is
improving and expandingQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
them.
So all these years do not matter.
Not sure what are you talking about, haven't we initialize
the device and vqs in config space for years?????? What's
wrong with thismechanism?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient
future.
Quoted 60 lines
Quoted 60 lines
Quoted 48 lines
Quoted 48 lines
Quoted 48 lines
Quoted 48 lines
Quoted 29 lines
Quoted 29 lines
Quoted 12 lines
Quoted 12 lines
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as
they are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?
No.
But the src/dst does not matter.
Queue_size to be set before DRIVER_OK like rest of the
registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the driver_ok phase.
Queue_reset was last moment exception.
create a queue? Nvidia specific?Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 6 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-off
lo
ad
-o
n-virtual-machines.htmlQuoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 2 lines
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
I don’t see any.
Nested is already solved using above.I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed.
I wont be able to work on the patches for it until we finish for the first levelvirtualization.
As you know, nested is supported well in current virtio, so please don't break it.
And same comment repeats. 😊
Expect same response...
Sorry, no virtio specification does not support device migration today. Nothing is broken by adding new features.
Above [1] has the right proposal that Jason's paper pointed out. Please use it.
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 236 lines · Parav Pandit
Quoted 228 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 17, 2023 3:32 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implementVIRTIO_F_QUEUE_STATEQuoted 87 lines · Parav Pandit
Quoted 87 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 53 lines · Parav Pandit
Quoted 53 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMOn 11/6/2023 12:12 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of
Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support
VIRTIO_F_QUEUE_STATE in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only fordriver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for
driver
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
*/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does notwork?
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec bug
fix was done when it
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially, it
take a lot of time to
read those slow register interface for this + inflight
descriptors +more.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not
present, number of
queues were not in hw.
The registers are control path in config space, how 400G or
800Gaffect??
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Because those are the one in practice requires large number of
VQs.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
You are asking per VQ register commands to modify things
dynamically viathis one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND and
RESUME.
Quoted 42 lines
Quoted 42 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
remote side.
Quoted 2 lines
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 11 lines
Quoted 11 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
See the virtio common cfg, you will find the max number of
vqs is there, num_queues.
:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Device didn’t support LM.
Many limitations existed all these years and TC is
improving and expandingQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
them.
So all these years do not matter.
Not sure what are you talking about, haven't we initialize
the device and vqs in config space for years?????? What's
wrong with thismechanism?
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficientfuture.
Quoted 60 lines
Quoted 60 lines
Quoted 48 lines
Quoted 48 lines
Quoted 48 lines
Quoted 48 lines
Quoted 29 lines
Quoted 29 lines
Quoted 12 lines
Quoted 12 lines
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as
they are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?
No.
But the src/dst does not matter.
Queue_size to be set before DRIVER_OK like rest of the
registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
queues must be created before the driver_ok phase.
Queue_reset was last moment exception.
create a queue? Nvidia specific?Huh. No.
Do git log and realize what happened with queue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 6 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-off
lo
ad
-o
n-virtual-machines.htmlQuoted 6 lines
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 2 lines
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
I don’t see any.
Nested is already solved using above.I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed.
I wont be able to work on the patches for it until we finish for the first levelvirtualization.
As you know, nested is supported well in current virtio, so please don't break it.
Quoted 6 lines
And same comment repeats. 😊
Expect same response...
Sorry, no virtio specification does not support device migration today. Nothing is broken by adding new features.Above [1] has the right proposal that Jason's paper pointed out. Please use it.
I was involved in the design in [1]. And I don't see a connection to the dicussion here
1) It is based on vDPA in L0
2) It doesn't address the nesting issue, it requires a proper design in the virtio spec to support migration in the nesting layer.
Thanks
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 259 lines
From: Jason Wang <[email protected]>
Sent: Tuesday, November 21, 2023 10:01 AMQuoted 72 lines · Parav Pandit
Quoted 72 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 17, 2023 3:32 PM
To: Parav Pandit <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]
Subject: Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci:
implementVIRTIO_F_QUEUE_STATEQuoted 58 lines · Parav Pandit
Quoted 58 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 54 lines · Parav Pandit
Quoted 54 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 41 lines · Parav Pandit
Quoted 41 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMOn 11/6/2023 6:52 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMOn 11/6/2023 12:12 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of
Zhu, Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support
VIRTIO_F_QUEUE_STATE in PCI transportlayer.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Signed-off-by: Zhu Lingshan
<[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex
b/transport-pci.tex index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-onlyfor
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
driver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only
for
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
driver
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
*/
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues
through register read writes, does
not work effectively.
There are inflight out of order descriptors for blockalso.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does
notwork?
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec
bug fix was done when itQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially,
it take a lot of time to
read those slow register interface for this +
inflight descriptors +more.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
interesting, virtio work in this pattern for many years,
right?
Quoted 130 lines
Quoted 130 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
All these years 400Gbps and 800Gbps virtio was not
present, number of
queues were not in hw.
The registers are control path in config space, how
400G or 800Gaffect??
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Because those are the one in practice requires large
number ofVQs.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
You are asking per VQ register commands to modify things
dynamically via
this one vq at a time, serializing all the operations.
It does not scale well with high q count.
This is not dynamically, it only happens when SUSPEND andRESUME.
Quoted 43 lines
Quoted 43 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
This is the same mechanism how virtio initialize a
virtqueue, working for many years.No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
remote side.
Quoted 2 lines
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 12 lines
Quoted 12 lines
Quoted 6 lines
Quoted 5 lines
See the virtio common cfg, you will find the max number
of vqs is there, num_queues.
:)
Sure. those values at high q count affects.
the driver need to initialize them anyway.That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 4 lines
Quoted 4 lines
Device didn’t support LM.
Many limitations existed all these years and TC is
improving and expanding
them.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
So all these years do not matter.
Not sure what are you talking about, haven't we
initialize the device and vqs in config space for
years?????? What's wrong with thismechanism?
Quoted 3 lines
Quoted 3 lines
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar
in-efficientfuture.
Quoted 62 lines
Quoted 62 lines
Quoted 53 lines
Quoted 53 lines
Quoted 53 lines
Quoted 53 lines
Quoted 30 lines
Quoted 30 lines
Quoted 12 lines
Quoted 12 lines
interesting, you know this is a one-time thing, right?
and you are aware of this has been there for years.
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as
they are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?
No.
But the src/dst does not matter.
Queue_size to be set before DRIVER_OK like rest of the
registers, as allQuoted 8 lines
Quoted 8 lines
queues must be created before the driver_ok phase.
Queue_reset was last moment exception.
create a queue? Nvidia specific?Huh. No.
Do git log and realize what happened with queue_reset.
You didn't answer the question, does the spec even has
defined "create avq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 7 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov
-off
lo
ad
-o
n-virtual-machines.htmlWe should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
Quoted 3 lines
Quoted 3 lines
problem.
Quoted 2 lines
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 2 lines
I don’t see any.
Nested is already solved using above.I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed. I wont be able to work on the patches for it until we finish for the first level
virtualization.
As you know, nested is supported well in current virtio, so please don'tbreak it.
Quoted 7 lines
And same comment repeats. 😊
Expect same response...
Sorry, no virtio specification does not support device migration today. Nothing is broken by adding new features.Above [1] has the right proposal that Jason's paper pointed out. Please use
Quoted 8 lines
it.
I was involved in the design in [1]. And I don't see a connection to the dicussion here
1) It is based on vDPA in L0
2) It doesn't address the nesting issue, it requires a proper design in the virtio spec to support migration in the nesting layer.
Nothing prevents [1] to be done without vdpa.
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 8 lines · Parav Pandit
Quoted 8 lines
From: Jason Wang <[email protected]>
Sent: Tuesday, November 21, 2023 10:01 AMQuoted 2 lines · Parav Pandit
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Sorry, no virtio specification does not support device migration today. Nothing is broken by adding new features.
Above [1] has the right proposal that Jason's paper pointed out. Please use
it.
Quoted 8 lines
Quoted 6 lines
I was involved in the design in [1]. And I don't see a connection to the dicussion here
1) It is based on vDPA in L0
2) It doesn't address the nesting issue, it requires a proper design in the virtio spec to support migration in the nesting layer.Nothing prevents [1] to be done without vdpa.
Well, Qemu has SR-IOV emulation for IGB. What's the point of the above reply? If a hypervisor wishes, it can be done with any device on L0.
We discuss the possibility of migrating nested VMs, not the possibility of emulating SR-IOV, no?
Thanks
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 27 lines · Jason Wang
Quoted 8 lines · Parav Pandit
Quoted 8 lines
From: Jason Wang <[email protected]>
Sent: Tuesday, November 21, 2023 10:01 AMQuoted 2 lines · Parav Pandit
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Sorry, no virtio specification does not support device migration today. Nothing is broken by adding new features.
Above [1] has the right proposal that Jason's paper pointed out. Please use
it.
Quoted 8 lines
Quoted 6 lines
I was involved in the design in [1]. And I don't see a connection to the dicussion here
1) It is based on vDPA in L0
2) It doesn't address the nesting issue, it requires a proper design in the virtio spec to support migration in the nesting layer.Nothing prevents [1] to be done without vdpa.
Quoted 7 lines
Well, Qemu has SR-IOV emulation for IGB. What's the point of the above reply? If a hypervisor wishes, it can be done with any device on L0.
We discuss the possibility of migrating nested VMs, not the possibility of emulating SR-IOV, no?
Thanks
It depends really. If the way to support nesting is to emulate sr-iov then the question becomes how hard it is to emulate sriov to the point where nesting works.
The fact that current hypervisors pretend that a VF is a PF when passing things on to guest and things still seem to work is nice but it's not a hugely important design point IMHO.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
RE: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 43 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Wednesday, November 22, 2023 12:45 PMQuoted 1 line · Jason Wang
On Wed, Nov 22, 2023 at 12:26 AM Parav Pandit <[email protected]>
Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 6 lines
From: Jason Wang <[email protected]>
Sent: Tuesday, November 21, 2023 10:01 AMOn Fri, Nov 17, 2023 at 6:06 PM Parav Pandit <[email protected]>
Quoted 21 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Sorry, no virtio specification does not support device migration today. Nothing is broken by adding new features.
Above [1] has the right proposal that Jason's paper pointed out. Please use
it.
Quoted 8 lines
Quoted 6 lines
I was involved in the design in [1]. And I don't see a connection to the dicussion here
1) It is based on vDPA in L0
2) It doesn't address the nesting issue, it requires a proper design in the virtio spec to support migration in the nesting layer.Nothing prevents [1] to be done without vdpa.
Quoted 7 lines
Well, Qemu has SR-IOV emulation for IGB. What's the point of the above reply? If a hypervisor wishes, it can be done with any device on L0.
We discuss the possibility of migrating nested VMs, not the possibility of emulating SR-IOV, no?
Thanks
Quoted 7 lines
It depends really. If the way to support nesting is to emulate sr-iov then the question becomes how hard it is to emulate sriov to the point where nesting works.
The fact that current hypervisors pretend that a VF is a PF when passing things on to guest and things still seem to work is nice but it's not a hugely important design point IMHO.
Nesting is not a virtio problem as if nested PCI devices needed, industry will work on it anyway that virtio will be able to leverage. We should focus on two practical and immediate cases of vfio and vdpa that for first level guest.
And admin command + admin queue on the owner device seems to suffice both the use cases.
We should progress towards this and unblock users to start using it.
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 1 line · Parav Pandit
Nesting is not a virtio problem
Really virtio problem is whatever virtio TC members are willing to tackle. I support work on nesting exactly to the same level I support work on platforms without memory change tracking. Both are non-universal, platform specific problems that platforms might address in the future.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
In reply to Zhu, LingshanQuoted 210 lines · Lingshan
Quoted 207 lines · Parav Pandit
Quoted 207 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 53 lines · Parav Pandit
Quoted 53 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMOn 11/6/2023 12:12 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only fordriver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for
driver
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
*/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does notwork?
Quoted 42 lines
Quoted 42 lines
Quoted 23 lines
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec bug
fix was done when it
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially, it take
a lot of time to
read those slow register interface for this + inflight
descriptors +more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present,
number of
queues were not in hw.
The registers are control path in config space, how 400G or
800Gaffect??
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things dynamically via
this one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
remote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
See the virtio common cfg, you will find the max number of
vqs is there, num_queues.:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving
and expanding
them.
So all these years do not matter.
Not sure what are you talking about, haven't we initialize
the device and vqs in config space for years?????? What's
wrong with thismechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Quoted 1 line
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Quoted 10 lines
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as they
are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?
No.
But the src/dst does not matter.
Queue_size to be set before DRIVER_OK like rest of the
registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
queues must be created before the driver_ok phase.
Queue_reset was last moment exception.
create a queue? Nvidia specific?Huh. No.
Do git log and realize what happened withqueue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 5 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offlo
ad
-o
n-virtual-machines.htmlQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 1 line
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
I don’t see any.
Nested is already solved using above.I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed.
I wont be able to work on the patches for it until we finish for the first level virtualization.As you know, nested is supported well in current virtio, so please don't break it.
So for nesting, it seems cleaner to support sending commands through device itself. You aren't going to fit VQ state in a 16 bit register in the general case though, and will have to resort to DMA. And if you are doing that then please just use the admin command format (does not have to be a VQ) and then we can all make peace finally.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 212 lines · Michael S. Tsirkin
Quoted 211 lines · Lingshan
Quoted 209 lines · Parav Pandit
Quoted 209 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 53 lines · Parav Pandit
Quoted 53 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMQuoted 13 lines · Parav Pandit
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMOn 11/6/2023 12:12 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only fordriver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for
driver
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
*/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does notwork?
Quoted 42 lines
Quoted 42 lines
Quoted 23 lines
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec bug
fix was done when it
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially, it take
a lot of time to
read those slow register interface for this + inflight
descriptors +more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present,
number of
queues were not in hw.
The registers are control path in config space, how 400G or
800Gaffect??
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things
dynamically viathis one vq at a time, serializing all the operations.
Quoted 1 line
It does not scale well with high q count.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This is not dynamically, it only happens when SUSPEND and RESUME. This is the same mechanism how virtio initialize a virtqueue, working for many years.
No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
remote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
See the virtio common cfg, you will find the max number of
vqs is there, num_queues.
:)
Sure. those values at high q count affects.the driver need to initialize them anyway.
That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving
and expanding
them.
So all these years do not matter.
Not sure what are you talking about, haven't we initialize
the device and vqs in config space for years?????? What's
wrong with thismechanism?
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.interesting, you know this is a one-time thing, right? and you are aware of this has been there for years.
Quoted 10 lines
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as they
are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?
No.
But the src/dst does not matter.
Queue_size to be set before DRIVER_OK like rest of the
registers, as allQuoted 8 lines
Quoted 8 lines
Quoted 6 lines
queues must be created before the driver_ok phase.
Queue_reset was last moment exception.
create a queue? Nvidia specific?Huh. No.
Do git log and realize what happened with queue_reset.You didn't answer the question, does the spec even has defined "create a
vq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 5 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offlo
ad
-o
n-virtual-machines.htmlQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 1 line
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
I don’t see any.
Nested is already solved using above.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed.
I wont be able to work on the patches for it until we finish for the first level virtualization.As you know, nested is supported well in current virtio, so please don't break it.
So for nesting, it seems cleaner to support sending commands through device itself.
I guess this requires per-VF admin vq or some agents & tricks.
Quoted 2 lines
You aren't going to fit VQ state in a 16 bit register in the general case though, and will have to resort to DMA.
Yes, at least we need in-flight descriptors tracking. Still working with Eugenio for this feature.
Quoted 4 lines
And if you are
doing that then please just use the admin command format (does not have to be a VQ) and then we can all make peace finally.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 215 lines · Lingshan
Quoted 212 lines · Michael S. Tsirkin
Quoted 211 lines · Lingshan
Quoted 209 lines · Parav Pandit
Quoted 209 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 16, 2023 3:45 PMQuoted 53 lines · Parav Pandit
Quoted 53 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 13, 2023 2:56 PMQuoted 40 lines · Parav Pandit
Quoted 40 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 10, 2023 1:22 PMQuoted 22 lines · Parav Pandit
Quoted 22 lines
From: Zhu, Lingshan <[email protected]>
Sent: Thursday, November 9, 2023 3:39 PMQuoted 17 lines · Parav Pandit
Quoted 17 lines
From: Zhu, Lingshan <[email protected]>
Sent: Tuesday, November 7, 2023 3:02 PMOn 11/6/2023 6:52 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 2:57 PMOn 11/6/2023 12:12 PM, Parav Pandit wrote:
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:01 AMOn 11/3/2023 11:50 PM, Parav Pandit wrote:
From: [email protected]
<[email protected] open.org> On Behalf Of Zhu,
Lingshan
Sent: Friday, November 3, 2023 8:27 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
On 11/3/2023 7:35 PM, Parav Pandit wrote:
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PMThis patch adds two new le16 fields to common
configuration structure to support VIRTIO_F_QUEUE_STATE
in PCI transportlayer.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Signed-off-by: Zhu Lingshan <[email protected]>
---
transport-pci.tex | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
diff --git a/transport-pci.tex b/transport-pci.tex
index
a5c6719..3161519 100644
--- a/transport-pci.tex
+++ b/transport-pci.tex
@@ -325,6 +325,10 @@ \subsubsection{Commonconfiguration
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
structure
layout}\label{sec:Virtio Transport
/* About the administration virtqueue. */
le16 admin_queue_index; /* read-only fordriver
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
*/
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
le16 admin_queue_num; /* read-only for
driver
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
*/
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
+
+ /* Virtqueue state */
+ le16 queue_avail_state; /* read-write */
+ le16 queue_used_state; /* read-write */
This tiny interface for 128 virtio net queues through
register read writes, does
not work effectively.
There are inflight out of order descriptors for block also.
Hence toy registers like this do not work.
Do you know there is a queue_select? Why this does notwork?
Quoted 42 lines
Quoted 42 lines
Quoted 23 lines
Quoted 23 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Do you know how other queue related fields work?
:)
Yes. If you notice queue_reset related critical spec bug
fix was done when it
was introduced so that live migration can _actually_ work.
When queue_select is done for 128 queues serially, it take
a lot of time to
read those slow register interface for this + inflight
descriptors +more.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
interesting, virtio work in this pattern for many years, right?
All these years 400Gbps and 800Gbps virtio was not present,
number of
queues were not in hw.
The registers are control path in config space, how 400G or
800Gaffect??
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Because those are the one in practice requires large number of VQs.
You are asking per VQ register commands to modify things
dynamically via
this one vq at a time, serializing all the operations.
It does not scale well with high q count.Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
This is not dynamically, it only happens when SUSPEND and RESUME.
This is the same mechanism how virtio initialize a virtqueue,
working for many years.No. when virtio driver initializes it for the first time, there is no active traffic
that gets lost.
Quoted 2 lines
This is because the interface is not yet up and not part of the network
yet.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
The resume must be fast enough, because the remote node is sending
packets.
Quoted 1 line
Hence it is different from driver init time queue enable.
I am not sure any packets arrive before a link announce at the destination
side.
Quoted 3 lines
I think it can.
Because there is no notification of member device link down intimation toQuoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
remote side.
Quoted 1 line
The L4 and L5 protocols have no knowledge that node which they are
interacting is behind some layers of switches.
Quoted 1 line
So keeping this time low is desired.
The NIC should broad cast itself first, so that other peers in the network know(for example its mac to route it) how to send a message to
it.
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
Quoted 70 lines
This is necessary, for example
VIRTIO_NET_F_GUEST_ANNOUNCE, similar mechanism work for in-marketing productions for years.This is out of the topic anyway.
Quoted 48 lines
Quoted 48 lines
Quoted 6 lines
Quoted 5 lines
See the virtio common cfg, you will find the max number of
vqs is there, num_queues.
:)
Sure. those values at high q count affects.
the driver need to initialize them anyway.That is before the traffic starts from remote end.
see above, that needs a link announce and this is after re-initialization
Quoted 8 lines
Quoted 8 lines
Device didn’t support LM.
Many limitations existed all these years and TC is improving
and expanding
them.
So all these years do not matter.
Not sure what are you talking about, haven't we initialize
the device and vqs in config space for years?????? What's
wrong with thismechanism?
Quoted 14 lines
Quoted 14 lines
Are you questioning virito-pci fundamentals???
Don’t point to in-efficient past to establish similar in-efficient future.
interesting, you know this is a one-time thing, right?
and you are aware of this has been there for years.
Like how to set a queue size and enable it?
Those are meant to be used before DRIVER_OK stage as they
are init time
registers.
Not to keep abusing them..
don't you need to set queue_size at the destination side?
No.
But the src/dst does not matter.
Queue_size to be set before DRIVER_OK like rest of the
registers, as allQuoted 8 lines
Quoted 8 lines
queues must be created before the driver_ok phase.
Queue_reset was last moment exception.
create a queue? Nvidia specific?Huh. No.
Do git log and realize what happened with queue_reset.
You didn't answer the question, does the spec even has defined
"create avq"?
Quoted 2 lines
Enabled/created = tomato/tomato when discussing the spec in non-normative
email conversation.
Quoted 1 line
It's irrelevant.
Then lets not debate on this enable a vq or create a vq anymore
Quoted 3 lines
All I am saying is, when we know the limitations of the transport and when industry is forwarding to not introduced more and more on-die register
Quoted 7 lines
Quoted 5 lines
for once in lifetime work of device migration, we just use the optimal command and queue interface that is native to virtio. PCI config space has its own limitations, and admin vq has its advantages, but that does not apply to all use cases.
There was a recent work done emulating the SR-IOV cap and allowing VM to
enable SR-IOV in [1].
Quoted 4 lines
This is the option I mentioned few weeks ago.
So with admin commands and admin virtqueues, even nested model will work
using [1].
Quoted 5 lines
[1]
https://netdevconf.info/0x17/sessions/talk/unleashing-sr-iov-offlo
ad
-o
n-virtual-machines.htmlQuoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
We should take this into consideration once it is standardized in the spec, maybe not now, there can always be many workarounds to solve one
problem.
Quoted 1 line
Sure, until that point the admin commands are able to suffice the need
well.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
And when the spec changes in transport occurs (if needed), current admin
command and admin vq also fits very well that will follow above [1]. we have pointed lots of problems for admin vq based live migration proposal, I won't repeat them here
I don’t see any.
Nested is already solved using above.
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
I don't see how, do you mind to work out the patches?
Once the base series is completed, nested cases can be addressed.
I wont be able to work on the patches for it until we finish for the first level virtualization.As you know, nested is supported well in current virtio, so please don't break it.
So for nesting, it seems cleaner to support sending commands through device itself.
I guess this requires per-VF admin vq or some agents & tricks.
I suggested a gateway in the VF for this. Really more or less like what you did for write tracking except use the admin command format. We'll need a new group type which just includes device itself.
Quoted 8 lines
Quoted 2 lines
You aren't going to fit VQ state in a 16 bit register in the general case though, and will have to resort to DMA.
Yes, at least we need in-flight descriptors tracking. Still working with Eugenio for this feature.
Quoted 4 lines
And if you are
doing that then please just use the admin command format (does not have to be a VQ) and then we can all make peace finally.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
In reply to Zhu LingshanQuoted 31 lines · Zhu Lingshan
This patch adds two new le16 fields to common configuration structure to support
VIRTIO_F_QUEUE_STATEin PCI transport layer.Signed-off-by Zhu Lingshan <[email protected]>--- transport-pci.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)transport-pci.tex +8
-0@@ -325,6 +325,10 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport /* About the administration virtqueue. */ le16 admin_queue_index; /* read-only for driver */ le16 admin_queue_num; /* read-only for driver */ + + /* Virtqueue state */ + le16 queue_avail_state; /* read-write */ + le16 queue_used_state; /* read-write */ }; \end{lstlisting}@@ -428,6 +432,17 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport The value 0 indicates no supported administration virtqueues. This field is valid only if VIRTIO_F_ADMIN_VQ has been negotiated. + +\item[\field{queue_avail_state}] + This field is valid only if VIRTIO_F_QUEUE_STATE has been + negotiated. The driver sets and gets the available state of
transport-pci.tex \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport · line 448
Quoted 10 lines
transport-pci.tex +7
-0+ the virtqueue here (see \ref{sec:Virtqueues / Virtqueue State}). + +\item[\field{queue_used_state}] + This field is valid only if VIRTIO_F_QUEUE_STATE has been + negotiated. The driver sets and gets the used state of the + virtqueue here (see \ref{sec:Virtqueues / Virtqueue State}). + \end{description} \devicenormative{\paragraph}{Common configuration structure layout}{Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Common configuration structure layout}
Two fields are pointless in the general case. Fix this to at least support out of order buffer use, then there's something to talk about. I suspect we'll be back to yet another bespoke mailbox and a bitmap for this.
Quoted 12 lines
transport-pci.tex +3
-0@@ -488,6 +503,9 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport present either a value of 0 or a power of 2 in \field{queue_size}. +If VIRTIO_F_QUEUE_STATE has not been negotiated, the device MUST ignore +any accesses to \field{queue_avail_state} and \field{queue_used_state}. + If VIRTIO_F_ADMIN_VQ has been negotiated, the value \field{admin_queue_index} MUST be equal to, or bigger than \field{num_queues}; also, \field{admin_queue_num} MUST beSignature · 1 line
2.35.3
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 41 lines · Michael S. Tsirkin
Quoted 40 lines · Zhu Lingshan
This patch adds two new le16 fields to common configuration structure to support
VIRTIO_F_QUEUE_STATEin PCI transport layer.Signed-off-by Zhu Lingshan <[email protected]>--- transport-pci.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)transport-pci.tex +15
-0@@ -325,6 +325,10 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport /* About the administration virtqueue. */ le16 admin_queue_index; /* read-only for driver */ le16 admin_queue_num; /* read-only for driver */ + + /* Virtqueue state */ + le16 queue_avail_state; /* read-write */ + le16 queue_used_state; /* read-write */ }; \end{lstlisting}@@ -428,6 +432,17 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport The value 0 indicates no supported administration virtqueues. This field is valid only if VIRTIO_F_ADMIN_VQ has been negotiated. + +\item[\field{queue_avail_state}] + This field is valid only if VIRTIO_F_QUEUE_STATE has been + negotiated. The driver sets and gets the available state of + the virtqueue here (see \ref{sec:Virtqueues / Virtqueue State}). + +\item[\field{queue_used_state}] + This field is valid only if VIRTIO_F_QUEUE_STATE has been + negotiated. The driver sets and gets the used state of the + virtqueue here (see \ref{sec:Virtqueues / Virtqueue State}). + \end{description}
Quoted 6 lines
transport-pci.tex \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport · line 448
Quoted 1 line
transport-pci.tex +0
-0\devicenormative{\paragraph}{Common configuration structure layout}{Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Common configuration structure layout}Two fields are pointless in the general case. Fix this to at least support out of order buffer use, then there's something to talk about. I suspect we'll be back to yet another bespoke mailbox and a bitmap for this.
For split virtqueue, it has available ring, used ring and descriptor table, means the device can always tell which descriptor/buffer is in-flight or not processed even when out_of_order.
For packed virtqueue, because the descriptors may be overwritten, so when out_out_order, the descriptors behind last_avial_idx should be considered as in-flight and should be processed at the destination side.
Does this work for you?
Quoted 6 lines
Quoted 6 lines
transport-pci.tex +0
-0@@ -488,6 +503,9 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport present either a value of 0 or a power of 2 in \field{queue_size}.
Quoted 8 lines
Quoted 8 lines
transport-pci.tex +3
-0+If VIRTIO_F_QUEUE_STATE has not been negotiated, the device MUST ignore +any accesses to \field{queue_avail_state} and \field{queue_used_state}. + If VIRTIO_F_ADMIN_VQ has been negotiated, the value \field{admin_queue_index} MUST be equal to, or bigger than \field{num_queues}; also, \field{admin_queue_num} MUST beSignature · 1 line
2.35.3
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 4/6] virtio-pci: implement VIRTIO_F_QUEUE_STATE
Quoted 48 lines · Lingshan
Quoted 37 lines · Michael S. Tsirkin
Quoted 36 lines · Zhu Lingshan
This patch adds two new le16 fields to common configuration structure to support
VIRTIO_F_QUEUE_STATEin PCI transport layer.Signed-off-by Zhu Lingshan <[email protected]>--- transport-pci.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)transport-pci.tex +14
-0@@ -325,6 +325,10 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport /* About the administration virtqueue. */ le16 admin_queue_index; /* read-only for driver */ le16 admin_queue_num; /* read-only for driver */ + + /* Virtqueue state */ + le16 queue_avail_state; /* read-write */ + le16 queue_used_state; /* read-write */ }; \end{lstlisting}@@ -428,6 +432,17 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport The value 0 indicates no supported administration virtqueues. This field is valid only if VIRTIO_F_ADMIN_VQ has been negotiated. + +\item[\field{queue_avail_state}] + This field is valid only if VIRTIO_F_QUEUE_STATE has been + negotiated. The driver sets and gets the available state of + the virtqueue here (see \ref{sec:Virtqueues / Virtqueue State}). + +\item[\field{queue_used_state}] + This field is valid only if VIRTIO_F_QUEUE_STATE has been + negotiated. The driver sets and gets the used state of the + virtqueue here (see \ref{sec:Virtqueues / Virtqueue State}).Quoted 8 lines
transport-pci.tex \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport · line 448
Quoted 3 lines
transport-pci.tex +1
-0+ \end{description} \devicenormative{\paragraph}{Common configuration structure layout}{Virtio Transport Options / Virtio Over PCI Bus / PCI Device Layout / Common configuration structure layout}Two fields are pointless in the general case. Fix this to at least support out of order buffer use, then there's something to talk about. I suspect we'll be back to yet another bespoke mailbox and a bitmap for this.
Quoted 3 lines
For split virtqueue, it has available ring, used ring and descriptor table, means the device can always tell which descriptor/buffer is in-flight or not processed even when
out_of_order.
Unfortunately, I don't believe so. Hard to say exactly without a specific algorithm you propose what the bug in it is. Describe an algorithm I should be able to point the issues out to you.
Quoted 5 lines
For packed virtqueue, because the descriptors may be overwritten, so when
out_out_order, the descriptors behindlast_avial_idxshould be considered as in-flight and should be processed at the destination side.Does this work for you?
Not without a lot more detail.
Quoted 13 lines
Quoted 13 lines
Quoted 13 lines
transport-pci.tex +3
-0@@ -488,6 +503,9 @@ \subsubsection{Common configuration structure layout}\label{sec:Virtio Transport present either a value of 0 or a power of 2 in \field{queue_size}. +If VIRTIO_F_QUEUE_STATE has not been negotiated, the device MUST ignore +any accesses to \field{queue_avail_state} and \field{queue_used_state}. + If VIRTIO_F_ADMIN_VQ has been negotiated, the value \field{admin_queue_index} MUST be equal to, or bigger than \field{num_queues}; also, \field{admin_queue_num} MUST beSignature · 1 line
2.35.3
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
PATCH v2 5/6 virtio: introduce dirty page tracking facility
In reply to Zhu LingshanThis commit introduce a new virtio facility to track device dirty pages, a typical use case is live migration.
The implementation of this facility is transport specific.
--- content.tex | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
content.tex +26 -2
@@ -127,10 +127,10 @@ \section{Feature Bits}\label{sec:Basic Facilities of a Virtio Device / Feature B \begin{description} \item[0 to 23, and 50 to 127] Feature bits for the specific device type -\item[24 to 43] Feature bits reserved for extensions to the queue and +\item[24 to 44] Feature bits reserved for extensions to the queue and feature negotiation mechanisms -\item[44 to 49, and 128 and above] Feature bits reserved for future extensions. +\item[45 to 49, and 128 and above] Feature bits reserved for future extensions. \end{description} \begin{note}
@@ -535,6 +535,27 @@ \section{Exporting Objects}\label{sec:Basic Facilities of a Virtio Device / Expo \input{admin.tex} +\section{Memory Dirty Pages Tracker}\label{sec:Basic Facilities of a Virtio Device / Memory Dirty Pages Tracker} + +A "dirty page" refers to a page in memory that has been modified by the device +but have not yet been acknowledged or processed by the CPU. + +This Memory Dirty Pages Tracker is a device facility that can record and report +dirty pages caused by the device in device address space. + +The device offers a feature bit VIRTIO_F_MEM_TRACK if capable of tracking dirty pages. +The implementation of this dirty page tracking facility is transport specific. + +A typical use case of this facility is to track dirty pages during live migration process. + +\drivernormative{\subsection}{Memory Dirty Pages Tracker}{Facilities of a Virtio Device / Memory Dirty Pages Tracker} + +The driver MUST fetch and clear dirty page information atomically. + +\devicenormative{\subsection}{Memory Dirty Pages Tracker}{Facilities of a Virtio Device / Memory Dirty Pages Tracker} + +The device MUST report the dirty page information atomically. + \chapter{General Initialization And Device Operation}\label{sec:General Initialization And Device Operation} We start with an overview of device initialization, then expand on the
@@ -910,6 +931,9 @@ \chapter{Reserved Feature Bits}\label{sec:Reserved Feature Bits} SUSPEND the device. See \ref{sec:Basic Facilities of a Virtio Device / Device Status Field}. + \item[VIRTIO_F_MEM_TRACK(44)] This feature indicates that the device can track + memory dirty pages caused by itself. + \end{description} \drivernormative{\section}{Reserved Feature Bits}{Reserved Feature Bits}
Signature · 18 lines
2.35.3 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] RE: [PATCH V2 5/6] virtio: introduce dirty page tracking facility
Hi Jason,
Quoted 11 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PM
This commit introduce a new virtio facility to track device dirty pages, a typical use case is live migration.The implementation of this facility is transport specific.
Signed-off-by Zhu Lingshan <[email protected]>Signed-off-by Jason Wang <[email protected]>
In my series of dirty page tracking (aka write recording), you kept insisting until Thu, that it is optional, and platform will do it. Why do you propose this facility now?
Can you please explain as commit log says typical use case is "live migration"? :)
[virtio-comment] Re: [PATCH V2 5/6] virtio: introduce dirty page tracking facility
Quoted 7 lines · Parav Pandit
Hi Jason,
Quoted 5 lines
From: Zhu Lingshan <[email protected]>
Sent: Friday, November 3, 2023 4:05 PM
This commit introduce a new virtio facility to track device dirty pages, a typical use case is live migration.
Quoted 8 lines
Quoted 5 lines
The implementation of this facility is transport specific.
Signed-off-by Zhu Lingshan <[email protected]>Signed-off-by Jason Wang <[email protected]>In my series of dirty page tracking (aka write recording), you kept insisting until Thu, that it is optional, and platform will do it. Why do you propose this facility now?
Can you please explain as commit log says typical use case is "live migration"? :)
You misunderstood us.
If you remember, it is you challenge our config space proposal (v1) is incomplete without dirty page tracking facility.
This is to answer your challenge, as an optional backup.
We still believe dirty page tracking should be better done by platform facilities, like vt-d.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
PATCH v2 6/6 virtio-pci: implement dirty page tracking
In reply to Zhu LingshanThis commit implements dirty page tracking facility in PCI transport layer.
--- transport-pci.tex | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)
transport-pci.tex +72 -0
@@ -188,6 +188,8 @@ \subsection{Virtio Structure PCI Capabilities}\label{sec:Virtio Transport Option #define VIRTIO_PCI_CAP_SHARED_MEMORY_CFG 8 /* Vendor-specific data */ #define VIRTIO_PCI_CAP_VENDOR_CFG 9 +/* Memory Dirty Pages Tracker*/ +#define VIRTIO_PCI_CAP_MEMORY_TRACK_CFG 10 \end{lstlisting} Any other value is reserved for future use.
@@ -1230,3 +1232,73 @@ \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options / re-examine the configuration space to see what changed. \end{itemize} \end{itemize} + +\subsection{Memory Dirty Pages Tracker Capability}\label{sec:Virtio +Transport Options / Virtio Over PCI Bus / PCI Device Layout / +Memory Dirty Pages Tracker Capability} + +The Memory Dirty Pages Tracker facility is found at \field{bar} and \field{offset} in VIRTIO_PCI_CAP_MEMORY_TRACK_CFG capability. +Its layout is shown below: + +\begin{lstlisting} +struct virtio_pci_dity_page_track { + u8 enable; /* Read-Write */ + u8 gra_power; /* Read-Write */ + u8 reserved[2]; + le32 { + pasid: 20; /* Read-Write */ + reserved: 12; + }; + le64 bitmap_addr; /* Read-Write */ + le64 bitmap_length; /* Read-Write */ +}; +\end{lstlisting} + +\begin{description} +\item[\field{enable}] + The driver writes 1 to enable dirty pages tracking and sets 0 to disable. +\item[\field{gra_power}] + The driver uses this to set the dirty pages tracking granularity. + Each bit in the bitmap covers page_size = 2\^{}(12 + gra_power) bytes, + so when gra_power == 0, 4K bytes page is default. +\item[\field{pasid}] + Optionally, the driver uses this to assign a pasid to this capability. +\item[\field{bitmap_addr}] + The driver use this to set the address of the bitmap which records the dirty pages + caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so on in a linear manner. + When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating the page is dirty. +\item[\field{bitmap_length}] + The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when reporting dirty pages. + +To prevent a read-modify-write procedure, if a memory page is dirty, +optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1. + +The device MAY increase \field{gra_power} to reduce \field{bitmap_length}. + +The device must ignore any writes to \field{pasid} if PASID Extended Capability is absent or +the PASID functionality is disabled in PASID Extended Capability + +The bitmap which starts at \field{bitmap_addr} SHOULD not be considered +as dirty when the device write to it. + +On a reset, the device MUST reset \field{pasid} and \field{enable}, and stop +tracking dirty pages. + +\drivernormative{\subsubsection}{Memory Dirty Pages Tracker Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory Dirty Pages Tracker Capability} + +The driver is responsible to allocate the bitmap for tracking device dirty pages. + +Upon retrieving a cluster of bits from the bitmap, the driver MUST clear each of them by setting 0. + +The driver MUST configure \field{pasid} if PASID is enabled in PASID Extended Capability. + +The driver SHOULD NOT access \field{pasid} if PASID Extended Capability is absent or +the PASID functionality is disabled in PASID Extended Capability.
Signature · 18 lines
2.35.3 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options / · line 1255
Quoted 13 lines · Zhu Lingshan
+\begin{lstlisting}
transport-pci.tex +12
-0+struct virtio_pci_dity_page_track { + u8 enable; /* Read-Write */ + u8 gra_power; /* Read-Write */ + u8 reserved[2]; + le32 { + pasid: 20; /* Read-Write */ + reserved: 12; + }; + le64 bitmap_addr; /* Read-Write */ + le64 bitmap_length; /* Read-Write */ +}; +\end{lstlisting}
Okay, so it's a simple mailbox in config space. Which by itself is probably a very reasonable idea - more or less what I suggested. However, using such a generic facility just for the dirty bitmap seems too limited. Please make it accept arbitrary commands. Reusing admin command structure with a special "device itself" group sounds like one way to do it.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Zhu Lingshan
+\begin{lstlisting}
transport-pci.tex +10
-0+struct virtio_pci_dity_page_track { + u8 enable; /* Read-Write */ + u8 gra_power; /* Read-Write */ + u8 reserved[2]; + le32 { + pasid: 20; /* Read-Write */ + reserved: 12; + }; + le64 bitmap_addr; /* Read-Write */ + le64 bitmap_length; /* Read-Write */
Quoted 8 lines
Quoted 2 lines
+};
+\end{lstlisting}Okay, so it's a simple mailbox in config space. Which by itself is probably a very reasonable idea - more or less what I suggested. However, using such a generic facility just for the dirty bitmap seems too limited. Please make it accept arbitrary commands. Reusing admin command structure with a special "device itself" group sounds like one way to do it.
processing admin cmds in a cap may be too complex and overkill.
we need to handle variable length of cmds, handle async returned results, and so on.
This struct seems easy and simple. And shall we use platform facilities like vt-d to track dirty pages?
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 23 lines · Lingshan
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Zhu Lingshan
+\begin{lstlisting}
+structvirtio_pci_dity_page_track{
+ u8 enable; /* Read-Write */ + u8 gra_power; /* Read-Write */ + u8 reserved[2];
+ le32 {
+ pasid: 20; /* Read-Write */ + reserved: 12;
+ };
+ le64 bitmap_addr; /* Read-Write */ + le64 bitmap_length; /* Read-Write */Quoted 8 lines
Quoted 2 lines
+};
+\end{lstlisting}Okay, so it's a simple mailbox in config space. Which by itself is probably a very reasonable idea - more or less what I suggested. However, using such a generic facility just for the dirty bitmap seems too limited. Please make it accept arbitrary commands. Reusing admin command structure with a special "device itself" group sounds like one way to do it.
Quoted 5 lines
processing admin cmds in a cap may be too complex and overkill.
we need to handle variable length of cmds, handle async returned results, and so on.This struct seems easy and simple. And shall we use platform facilities like vt-d to track dirty pages?
To demonstrate these issues, suppose we have a struct in a bar to process admin cmds:
struct virtio_admin_cmd {
u64 in_data_length;
u8 cmd_in_data[];
u64 out_data_length;
u8 cmd_out_data[];
u8 ret;
};
The problems are:
1) command_in_data and command_out data have variable length, so how many HW resource should be reserved in the bar?
2) To process the cmds in the bar, the device MAY need to read many registers in cmd_in_data[] and write many registers in cmd_out_data[], which can be ineffective, this is not DMA.
3) a bar can only process one cmd at a time, and the driver can only issue another cmd after received an ret.
This process has to be synchronous IO, one cmd blocks another.
4) VF implementing a bar processing admin cmds conflicts with PF's admin vq.
So I think a bar or a cap processing admin cmds is way to complex and overkill.
Thanks
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 36 lines · Lingshan
Quoted 23 lines · Lingshan
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Zhu Lingshan
+\begin{lstlisting}
+structvirtio_pci_dity_page_track{
+ u8 enable; /* Read-Write */ + u8 gra_power; /* Read-Write */ + u8 reserved[2];
+ le32 {
+ pasid: 20; /* Read-Write */ + reserved: 12;
+ };
+ le64 bitmap_addr; /* Read-Write */ + le64 bitmap_length; /* Read-Write */Quoted 8 lines
Quoted 2 lines
+};
+\end{lstlisting}Okay, so it's a simple mailbox in config space. Which by itself is probably a very reasonable idea - more or less what I suggested. However, using such a generic facility just for the dirty bitmap seems too limited. Please make it accept arbitrary commands. Reusing admin command structure with a special "device itself" group sounds like one way to do it.
Quoted 7 lines
processing admin cmds in a cap may be too complex and overkill. we need to handle variable length of cmds, handle async returned results, and so on.
This struct seems easy and simple. And shall we use platform facilities like vt-d
to track dirty pages?To demonstrate these issues, suppose we have a struct in a bar to process admin cmds:
Quoted 7 lines
struct
virtio_admin_cmd{
u64in_data_length;
u8 cmd_in_data[];
u64out_data_length;
u8 cmd_out_data[];
u8 ret;
};
An alternative is do same as you did here, e.g.:
struct virtio_admin_cmd {
u64 admin_cmd_pa; /* an out descriptor followed by an in descriptor */
u32 pasid : 20; u8 reserved : 11; u8 hardware : 1; };
or we can stick two lengths and addresses straight in the capability.
Quoted 3 lines
The problems are:
1)command_in_dataandcommand_outdata have variable length, so how many HW resource should be reserved in the bar?
actually admin commands are truncated by device so just set to length that device understands.
Quoted 3 lines
2) To process the cmds in the bar, the device MAY need to read many registers in cmd_in_data[] and write many registers in cmd_out_data[], which can be ineffective, this is not DMA.
True. Again if you don't want to depend on pasid that's the only option.
Quoted 3 lines
3) a bar can only process one cmd at a time, and the driver can only issue another cmd after received an ret.
This process has to be synchronous IO, one cmd blocks another.
Exactly same as what you did though.
Quoted 1 line
4) VF implementing a bar processing admin cmds conflicts with PF's admin vq.
So just don't create conflicts. It's same as multiple admin vqs really which we already support.
Quoted 5 lines
So I think a bar or a cap processing admin cmds is way to complex and overkill.
Thanks
Sounds like a straw man argument.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 42 lines · Michael S. Tsirkin
Quoted 34 lines · Lingshan
Quoted 22 lines · Lingshan
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Zhu Lingshan
+\begin{lstlisting}
+structvirtio_pci_dity_page_track{
+ u8 enable; /* Read-Write */ + u8 gra_power; /* Read-Write */ + u8 reserved[2];
+ le32 {
+ pasid: 20; /* Read-Write */ + reserved: 12;
+ };
+ le64 bitmap_addr; /* Read-Write */ + le64 bitmap_length; /* Read-Write */Quoted 8 lines
Quoted 2 lines
+};
+\end{lstlisting}Okay, so it's a simple mailbox in config space. Which by itself is probably a very reasonable idea - more or less what I suggested. However, using such a generic facility just for the dirty bitmap seems too limited. Please make it accept arbitrary commands. Reusing admin command structure with a special "device itself" group sounds like one way to do it.
Quoted 7 lines
processing admin cmds in a cap may be too complex and overkill. we need to handle variable length of cmds, handle async returned results, and so on.
This struct seems easy and simple. And shall we use platform facilities like vt-d
to track dirty pages?To demonstrate these issues, suppose we have a struct in a bar to process admin cmds:
Quoted 7 lines
struct
virtio_admin_cmd{
u64in_data_length;
u8 cmd_in_data[];
u64out_data_length;
u8 cmd_out_data[];
u8 ret;
};
Quoted 3 lines
An alternative is do same as you did here, e.g.:
structvirtio_admin_cmd{
u64admin_cmd_pa; /* an out descriptor followed by an in descriptor */
PA depends on IOMMU and ATS
Quoted 6 lines
u32 pasid : 20; u8 reserved : 11; u8 hardware : 1; };or we can stick two lengths and addresses straight in the capability.
Still can only process only one cmd at a time and others are blocked.
Quoted 7 lines
Quoted 5 lines
The problems are:
1)command_in_dataandcommand_outdata have variable length, so how many HW resource should be reserved in the bar?actually admin commands are truncated by device so just set to length that device understands.
How the framework know the length? How can the vendor know how many HW resource they should place here? I am not sure it is a good idea to guess.
Quoted 6 lines
Quoted 4 lines
2) To process the cmds in the bar, the device MAY need to read many registers in cmd_in_data[] and write many registers in cmd_out_data[], which can be ineffective, this is not DMA.
True. Again if you don't want to depend on pasid that's the only option.
Yes, this exactly shows how complex and overkill to use a cap to handle admin cmds. And maybe admin cmds is not a must.
Quoted 6 lines
Quoted 5 lines
3) a bar can only process one cmd at a time, and the driver can only issue another cmd after received an ret.
This process has to be synchronous IO, one cmd blocks another.Exactly same as what you did though.
We have implemented a cap in PCI for dirty page tracking, there are no admin cmds.
And for dirty page tracking, we still believe it is better to use platform facilities, as Jason explained.
Quoted 4 lines
Quoted 2 lines
4) VF implementing a bar processing admin cmds conflicts with PF's admin vq.
So just don't create conflicts. It's same as multiple admin vqs really which we already support.
How to tell the SW don't create conflict?
Quoted 8 lines
Quoted 6 lines
So I think a bar or a cap processing admin cmds is way to complex and overkill.
Thanks
Sounds like a straw man argument.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 45 lines · Lingshan
Quoted 42 lines · Michael S. Tsirkin
Quoted 41 lines · Lingshan
Quoted 22 lines · Lingshan
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Zhu Lingshan
+\begin{lstlisting}
+structvirtio_pci_dity_page_track{
+ u8 enable; /* Read-Write */ + u8 gra_power; /* Read-Write */ + u8 reserved[2];
+ le32 {
+ pasid: 20; /* Read-Write */ + reserved: 12;
+ };
+ le64 bitmap_addr; /* Read-Write */ + le64 bitmap_length; /* Read-Write */Quoted 8 lines
Quoted 2 lines
+};
+\end{lstlisting}Okay, so it's a simple mailbox in config space. Which by itself is probably a very reasonable idea - more or less what I suggested. However, using such a generic facility just for the dirty bitmap seems too limited. Please make it accept arbitrary commands. Reusing admin command structure with a special "device itself" group sounds like one way to do it.
Quoted 7 lines
processing admin cmds in a cap may be too complex and overkill. we need to handle variable length of cmds, handle async returned results, and so on.
This struct seems easy and simple. And shall we use platform facilities like vt-d
to track dirty pages?To demonstrate these issues, suppose we have a struct in a bar to process admin cmds:
struct
virtio_admin_cmd{
u64in_data_length;
u8 cmd_in_data[];
u64out_data_length;
u8 cmd_out_data[];
u8 ret;
};
Quoted 4 lines
Quoted 3 lines
An alternative is do same as you did here, e.g.:
structvirtio_admin_cmd{
u64admin_cmd_pa; /* an out descriptor followed by an in descriptor */PA depends on IOMMU and ATS
Not how virtio spec uses it. grep spec for physical address.
Quoted 7 lines
Quoted 6 lines
u32 pasid : 20; u8 reserved : 11; u8 hardware : 1; };or we can stick two lengths and addresses straight in the capability.
Still can only process only one cmd at a time and others are blocked.
Point being? Your patch is the same - thought you wanted simplicity? We could stick a full queue there for sure - does this seem like a good idea to you?
Quoted 10 lines
Quoted 7 lines
Quoted 5 lines
The problems are:
1)command_in_dataandcommand_outdata have variable length, so how many HW resource should be reserved in the bar?actually admin commands are truncated by device so just set to length that device understands.
How the framework know the length? How can the vendor know how many HW resource they should place here? I am not sure it is a good idea to guess.
I really don't want to repeat the whole admin command infrastructure explanation I thought it's pretty clear. device knows the length and truncates. Let's not get started on frameworks please.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
2) To process the cmds in the bar, the device MAY need to read many registers in cmd_in_data[] and write many registers in cmd_out_data[], which can be ineffective, this is not DMA.
True. Again if you don't want to depend on pasid that's the only option.
Yes, this exactly shows how complex and overkill to use a cap to handle admin cmds. And maybe admin cmds is not a must.
I don't know. But this patch in question is really just impractical. We can't implement silly one-off gateways for each new random thing. You work on this thing so it looks like it's the most important feature to you maybe, but virtio works very well for most people than you very much.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
3) a bar can only process one cmd at a time, and the driver can only issue another cmd after received an ret.
This process has to be synchronous IO, one cmd blocks another.Exactly same as what you did though.
We have implemented a cap in PCI for dirty page tracking, there are no admin cmds.
"implemented" as in "posted v1 of a very rough draft". with tradeoffs like increasing migration payload by a factor of x8. Or try to use AtomicOps, if you try you will I believe see commands can actually fail and so you need to report errors.
So maybe it's great for CXL. Should we be able to use platform capabilities if there? Of course. This is right in the charter. Must we limit ourselves to specific platforms with specific capabilities? if there are tc members interested in supported limited platforms without said capabilities, I don't see why we must.
Quoted 3 lines
And for dirty page tracking, we still believe it is better to use platform facilities,
as Jason explained.
So pls don't waste everyone's time trying to review stuff you don't think can work.
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
4) VF implementing a bar processing admin cmds conflicts with PF's admin vq.
So just don't create conflicts. It's same as multiple admin vqs really which we already support.
How to tell the SW don't create conflict?
It's like a single mutex in software or something no? We already say
It is the responsibility of the driver to ensure strict request ordering for commands, because they will be consumed with no order constraints.
seems enough for me.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
So I think a bar or a cap processing admin cmds is way to complex and overkill.
Thanks
Sounds like a straw man argument.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Zhu LingshanQuoted 12 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
transport-pci.tex +11
-0+ The driver use this to set the address of the bitmap which records the dirty pages + caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so on in a linear manner. + When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating the page is dirty. +\item[\field{bitmap_length}] + The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory Dirty Pages Tracker Capability}
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options / · line 1287
Quoted 10 lines
transport-pci.tex +10
-0+ +The device MUST NOT set any bits beyond bitmap_length when reporting dirty pages. + +To prevent a read-modify-write procedure, if a memory page is dirty, +optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1. + +The device MAY increase \field{gra_power} to reduce \field{bitmap_length}. + +The device must ignore any writes to \field{pasid} if PASID Extended Capability is absent or +the PASID functionality is disabled in PASID Extended Capability
I have to say this is going to work very badly when the number of dirty pages is small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 25 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMReview
Quoted 2 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
(quoted diff) +1
-0+ The driver use this to set the address of the bitmap which records thedirty pages
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 3 lines
transport-pci.tex +3
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so on in alinear manner.
Review
Quoted 2 lines
(quoted diff) +2
-0+ When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating thepage is dirty.
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 9 lines
+\item[\field{bitmap_length}]
transport-pci.tex +8
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory +Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when reportingdirty pages.
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ +To prevent a read-modify-write procedure, if a memory page is dirty,
It is not to prevent; it is just not possible to do racy RMW. 😊 Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
Secondly the bitmap array is function is for full guest memory size, while there is lot of sparce region now and also in future. This is the second problem.
This is exactly why I asked you to review the page write recording series of admin commands and comment. And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth explosion, admin commands of [1] stands better.
If you do [1] on the member device also using its AQ in future, it will work for non-passthrough case. If you build non-passthrough live migration using [1], also it will work.
So I don’t see any point of this series anymore.
[1] https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.html
Quoted 14 lines
Quoted 1 line
+optionally the device is permitted to set the entire byte, which encompasses
the relevant bit, to 1.
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 6 lines
transport-pci.tex +6
-0+ +The device MAY increase \field{gra_power} to reduce \field{bitmap_length}. + +The device must ignore any writes to \field{pasid} if PASID Extended +Capability is absent or the PASID functionality is disabled in PASID +Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap.
And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Yeah.
And device does not even know previously reported pages are read by driver or not. All guess work game for driver and device.
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 24 lines · Parav Pandit
Quoted 24 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMReview
Quoted 2 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
(quoted diff) +1
-0+ The driver use this to set the address of the bitmap which records thedirty pages
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 3 lines
transport-pci.tex +3
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so on in alinear manner.
Review
Quoted 2 lines
(quoted diff) +2
-0+ When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating thepage is dirty.
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 9 lines
+\item[\field{bitmap_length}]
transport-pci.tex +8
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory +Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when reportingdirty pages.
Quoted 3 lines
Quoted 2 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ +To prevent a read-modify-write procedure, if a memory page is dirty,It is not to prevent; it is just not possible to do racy RMW. 😊
if you understand what is a atomic routine, you will not call it racy.
Quoted 2 lines
Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
why? and this is optional.
Quoted 3 lines
Secondly the bitmap array is function is for full guest memory size, while there is lot of sparce region now and also in future. This is the second problem.
did you see gra_power and its comments?
Quoted 9 lines
This is exactly why I asked you to review the page write recording series of admin commands and comment. And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth explosion, admin commands of [1] stands better.
If you do [1] on the member device also using its AQ in future, it will work for non-passthrough case. If you build non-passthrough live migration using [1], also it will work.
So I don’t see any point of this series anymore.
As Jason pointed out, there are many problems in your proposal,
you should answer there. I don't need to repeat his words and duplicate the discussions.
you still need to explain why this does not work for pass-through. And I remember this is a point-less topic as MST ever wants to mute another "pass-through" thread.
Quoted 14 lines
Quoted 14 lines
Quoted 2 lines
+optionally the device is permitted to set the entire byte, which encompasses
the relevant bit, to 1.
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 6 lines
transport-pci.tex +6
-0+ +The device MAY increase \field{gra_power} to reduce \field{bitmap_length}. + +The device must ignore any writes to \field{pasid} if PASID Extended +Capability is absent or the PASID functionality is disabled in PASID +Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap.
And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Quoted 2 lines
Yeah.
And device does not even know previously reported pages are read by driver or not. All guess work game for driver and device.
see my reply to him
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 33 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 3, 2023 8:33 PMQuoted 28 lines · Parav Pandit
Quoted 28 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMReview
Quoted 3 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
(quoted diff) +2
-0+ The driver use this to set the address of the bitmap which records +thedirty pages
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 4 lines
transport-pci.tex +4
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so on +in alinear manner.
Review
Quoted 3 lines
(quoted diff) +3
-0+ When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating +thepage is dirty.
Review
Quoted 10 lines
+\item[\field{bitmap_length}]
(quoted diff) +9
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory +Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when +reportingdirty pages.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ +To prevent a read-modify-write procedure, if a memory page is +dirty,It is not to prevent; it is just not possible to do racy RMW. 😊
if you understand what is a atomic routine, you will not call it racy.
Quoted 2 lines
Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
why? and this is optional.
Because device cannot set individual bits in atomic way for same byte read by the cpu.
1. device read the byte that had bit 0 and 4 set.
2. cpu atomically clear these bits.
3. device wrote bits 0, 4, and new bits 2 and 3.
4. cpu now transferred page 0 and 4 again.
Optional thing also needs to work. :)
Quoted 5 lines
Quoted 2 lines
Secondly the bitmap array is function is for full guest memory size, while
there is lot of sparce region now and also in future.
Quoted 1 line
This is the second problem.
did you see
gra_powerand its comments?
gra_power says the page size.
Not the sparce multiple ranges of the guest memory. Device endup tracking uninterested area as well.
Quoted 6 lines
Quoted 2 lines
This is exactly why I asked you to review the page write recording series of
admin commands and comment.
Quoted 3 lines
And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth
Quoted 8 lines
explosion, admin commands of [1] stands better.
Quoted 2 lines
If you do [1] on the member device also using its AQ in future, it will work for
non-passthrough case.
Quoted 2 lines
If you build non-passthrough live migration using [1], also it will work. So I don’t see any point of this series anymore.
As Jason pointed out, there are many problems in your proposal, you should answer there. I don't need to repeat his words and duplicate the discussions.
Many are already addressed in v3.
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct control of the hypervisor.
The device is directly controlled by the guest including the device status and when it resets the device all the things stored in the device are lost.
2. the PCI FLR is clearing all the registers you exposed here.
3. Endless expansion of config registers of dirty tracking is not scalable, as they are not init time registers not following the Appendix B guidelines.
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
5. All the device context needed for passthrough based hypervisor for a device type specific is missing. All of those can be used for non-passthrough as well.
[1] https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085.html
Quoted 3 lines
And I
remember this is a point-less topic as MST ever wants to mute another "pass- through" thread.
No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.
Quoted 17 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, which +encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 10 lines
Quoted 10 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Quoted 4 lines
Quoted 2 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 7 lines · Parav Pandit
Quoted 4 lines
Quoted 3 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct control of the hypervisor.
The device is directly controlled by the guest including the device status and when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what? Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register,
if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?
Quoted 2 lines
2. the PCI FLR is clearing all the registers you exposed here.
Same problem, though FLR at least is expected to take a long time.
Quoted 4 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they are not init time registers not following the Appendix B guidelines.
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
Well pcie atomics exist. Not sure whether it's reasonable to rely on them. Any data on who common implementations are?
Quoted 11 lines
5. All the device context needed for passthrough based hypervisor for a device type specific is missing. All of those can be used for non-passthrough as well.
[1] https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085.htmlQuoted 3 lines
And I
remember this is a point-less topic as MST ever wants to mute another "pass- through" thread.No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.
I think you mean "ignoring" :)
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 4 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, which +encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 10 lines
Quoted 10 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 10 lines · Michael S. Tsirkin
Quoted 7 lines · Parav Pandit
Quoted 4 lines
Quoted 3 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct control of the hypervisor.
The device is directly controlled by the guest including the device status and when it resets the device all the things stored in the device are lost.I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
No, when device reset, the device is expected to forget everything and re-intialize.
Quoted 1 line
Is a full scan of all memory required until device reset is complete?
Who scan the memory? The device tracks its own dirty pages.
Quoted 4 lines
Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?
When reset, how can we expect the LM progress continue running.
For example, when the device DMA writes something, then reset before sending an interrupt, the DMA-ed pages should be lost as expected, right?
Quoted 3 lines
Quoted 2 lines
2. the PCI FLR is clearing all the registers you exposed here.
Same problem, though FLR at least is expected to take a long time.
If FLR, then whole device reset, and this is PCI, not virtio. As Jason pointed out, do you want to audit every PCI functionality?
Quoted 12 lines
Quoted 5 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they are not init time registers not following the Appendix B guidelines.
4. bitmap based dirty tracking is not atomic between cpu and device.
Hence, it is racy.Well pcie atomics exist. Not sure whether it's reasonable to rely on them. Any data on who common implementations are?
Quoted 4 lines
5. All the device context needed for passthrough based hypervisor for a device type specific is missing. All of those can be used for non-passthrough as well.
[1] https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085.html
Quoted 30 lines
Quoted 7 lines
Quoted 3 lines
And I
remember this is a point-less topic as MST ever wants to mute another "pass- through" thread.No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.I think you mean "ignoring" :)
Quoted 20 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, which +encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 9 lines
Quoted 9 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.Quoted 4 lines
Quoted 2 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 7 lines · Lingshan
Quoted 4 lines · Michael S. Tsirkin
Quoted 3 lines · Parav Pandit
Quoted 3 lines
Quoted 3 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.h
tml
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
you still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct control of the hypervisor.
The device is directly controlled by the guest including the device status and when it resets the device all the things stored in the device are lost.I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
No, when device reset, the device is expected to forget everything and re-intialize.
That's a problem then - memory that was already written will not be detected as such.
Quoted 2 lines
Quoted 1 line
Is a full scan of all memory required until device reset is complete?
Who scan the memory? The device tracks its own dirty pages.
yes but reset erases this information.
Quoted 9 lines
Quoted 4 lines
Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?
When reset, how can we expect the LM progress continue running.
For example, when the device DMA writes something, then reset before sending an interrupt,
the DMA-ed pages should be lost as expected, right?
interrupt is going to guest, has nothing to do with it.
device writes data into memory
device sends interrupt
driver sees data
driver sends reset
meanwhile hypervisor did not see any dirty pages
now what? hypervisor must apparently retrieve all
dirty page data before it can reset the device.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 11 lines · Michael S. Tsirkin
Quoted 10 lines · Lingshan
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Parav Pandit
Quoted 4 lines
Quoted 3 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct control of the hypervisor.
The device is directly controlled by the guest including the device status and when it resets the device all the things stored in the device are lost.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
No, when device reset, the device is expected to forget everything and re-intialize.
That's a problem then - memory that was already written will not be detected as such.
Two cases:
1) memory written and has sent an interrupt. Then CPU has acknowledged the data, it should process the data
2) memory written but no interrupt, this should be lost as expected.
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Is a full scan of all memory required until device reset is complete?
Who scan the memory? The device tracks its own dirty pages.
yes but reset erases this information.
should be, or the hypervisor will copy invalid information, cause a conflict.
I remember Jason as given an example on this.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?
When reset, how can we expect the LM progress continue running.
Quoted 8 lines
Quoted 3 lines
For example, when the device DMA writes something, then reset before sending an interrupt,
the DMA-ed pages should be lost as expected, right?interrupt is going to guest, has nothing to do with it.
device writes data into memory
device sends interrupt
driver sees data
At this point, the guest CPU owns the dirty pages, owns the data
Quoted 1 line
driver sends reset
At this point, the device should forget everything
Quoted 5 lines
meanwhile hypervisor did not see any dirty pages
now what? hypervisor must apparently retrieve all
dirty page data before it can reset the device.
It is not the hypervisor, once an interrupt has sent, the guest take over the pages.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Michael S. TsirkinQuoted 15 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:42 PMQuoted 7 lines · Parav Pandit
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
Quoted 9 lines
when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?
You meant the gateway is not in the device, right?
I likely didn't understand. I don't see a relation to timing.
When the device reset is not trapped by the hypervisor, most things does not work, it requires trapping other things to like cvq, device registers and more. It may be fine for those use case, but it does not fullfill the requirement of passthrough mode of hw.
Quoted 6 lines
Quoted 2 lines
2. the PCI FLR is clearing all the registers you exposed here.
Same problem, though FLR at least is expected to take a long time.
Quoted 9 lines
Quoted 1 line
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines.
Quoted 2 lines
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
Well pcie atomics exist. Not sure whether it's reasonable to rely on them. Any data on who common implementations are?
Pci atomics are (a) fetch add, (b) swap, (c) CAS.
Not atomic_OR().
Quoted 10 lines
Quoted 1 line
5. All the device context needed for passthrough based hypervisor for a
device type specific is missing.
Quoted 8 lines
All of those can be used for non-passthrough as well.
[1]
https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085.h
tmlQuoted 3 lines
And I
remember this is a point-less topic as MST ever wants to mute another "pass- through" thread.
Quoted 7 lines
Quoted 4 lines
No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.I think you mean "ignoring" :)
I am sorry, yes, I meant ignoring.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 24 lines · Parav Pandit
Quoted 15 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:42 PMQuoted 7 lines · Parav Pandit
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
Quoted 9 lines
when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?
Quoted 6 lines
You meant the gateway is not in the device, right?
I likely didn't understand. I don't see a relation to timing.
When the device reset is not trapped by the hypervisor, most things does not work, it requires trapping other things to like cvq, device registers and more. It may be fine for those use case, but it does not fullfill the requirement of passthrough mode of hw.
I wish we'd just stop using the term, it just confuses everyone.
I feel the point worth making is that currently, all this job is done by hypervisors. And they manage fine! vdpa really truly does not need the SUSPEND bit because it knows about devices and it
can just use whatever it wants in any vendor specific way it wants.
where all this migration work comes handy is if we say that we want our device to all just do what the
spec says. No vendor specific tricks. And I find it exciting that there are people who want to work on this instead of each vendor wasting man hours on their own almost the same but slightly different driver.
I personally think this patch is not great for the trap use-case either. Why? For example if device is somewhat slow then it will take it hundreds of milliseconds to synchronize the whole guest memory, and blocking reset means blocking e.g. guest boot. I was wrong about soft lockup btw - linux does msleep which I think means no soft lockups. But boot is blocked and modules are not loaded.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 28 lines · Michael S. Tsirkin
Quoted 27 lines · Parav Pandit
Quoted 14 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:42 PMQuoted 7 lines · Parav Pandit
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
Quoted 9 lines
when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?You meant the gateway is not in the device, right?
I likely didn't understand. I don't see a relation to timing.
Quoted 8 lines
Quoted 2 lines
When the device reset is not trapped by the hypervisor, most things does not work, it requires trapping other things to like cvq, device registers and more. It may be fine for those use case, but it does not fullfill the requirement of passthrough mode of hw.
I wish we'd just stop using the term, it just confuses everyone.
I feel the point worth making is that currently, all this job is done by hypervisors. And they manage fine! vdpa really truly does not need the SUSPEND bit because it knows about devices and it
can just use whatever it wants in any vendor specific way it wants.
So true, this is exact what Intel implements in some productions.
Quoted 7 lines
where all this migration work comes handy is if we say that we want our device to all just do what the
spec says. No vendor specific tricks. And I find it exciting that there are people who want to work on this instead of each vendor wasting man hours on their own almost the same but slightly different driver.
I agree
Quoted 7 lines
I personally think this patch is not great for the trap use-case either. Why? For example if device is somewhat slow then it will take it hundreds of milliseconds to synchronize the whole guest memory, and blocking reset means blocking e.g. guest boot. I was wrong about soft lockup btw - linux does msleep which I think means no soft lockups. But boot is blocked and modules are not loaded.
I am not sure SUSPEND can block RESET, I think reset can take immediate actions, because once reset, whether suspended does not matter.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 55 lines · Lingshan
Quoted 28 lines · Michael S. Tsirkin
Quoted 27 lines · Parav Pandit
Quoted 14 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:42 PMQuoted 7 lines · Parav Pandit
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
Quoted 9 lines
when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?You meant the gateway is not in the device, right?
I likely didn't understand. I don't see a relation to timing.
Quoted 8 lines
Quoted 2 lines
When the device reset is not trapped by the hypervisor, most things does not work, it requires trapping other things to like cvq, device registers and more. It may be fine for those use case, but it does not fullfill the requirement of passthrough mode of hw.
I wish we'd just stop using the term, it just confuses everyone.
I feel the point worth making is that currently, all this job is done by hypervisors. And they manage fine! vdpa really truly does not need the SUSPEND bit because it knows about devices and it
can just use whatever it wants in any vendor specific way it wants.So true, this is exact what Intel implements in some productions.
Quoted 7 lines
where all this migration work comes handy is if we say that we want our device to all just do what the
spec says. No vendor specific tricks. And I find it exciting that there are people who want to work on this instead of each vendor wasting man hours on their own almost the same but slightly different driver.I agree
Quoted 7 lines
I personally think this patch is not great for the trap use-case either. Why? For example if device is somewhat slow then it will take it hundreds of milliseconds to synchronize the whole guest memory, and blocking reset means blocking e.g. guest boot. I was wrong about soft lockup btw - linux does msleep which I think means no soft lockups. But boot is blocked and modules are not loaded.
Quoted 3 lines
I am not sure SUSPEND can block RESET, I think reset can take immediate actions, because
once reset, whether suspended does not matter.
No, because if you don't suspend device will keep changing memory. You need to
1. suspend
2. get all dirty memory synced
3. reset
Reset earlier will corrupt guest memory.
Quoted 1 line
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 55 lines · Michael S. Tsirkin
Quoted 51 lines · Lingshan
Quoted 27 lines · Michael S. Tsirkin
Quoted 26 lines · Parav Pandit
Quoted 13 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:42 PMQuoted 7 lines · Parav Pandit
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
Quoted 9 lines
when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?You meant the gateway is not in the device, right?
I likely didn't understand. I don't see a relation to timing.
Quoted 8 lines
Quoted 2 lines
When the device reset is not trapped by the hypervisor, most things does not work, it requires trapping other things to like cvq, device registers and more. It may be fine for those use case, but it does not fullfill the requirement of passthrough mode of hw.
I wish we'd just stop using the term, it just confuses everyone.
I feel the point worth making is that currently, all this job is done by hypervisors. And they manage fine! vdpa really truly does not need the SUSPEND bit because it knows about devices and it
can just use whatever it wants in any vendor specific way it wants.So true, this is exact what Intel implements in some productions.
Quoted 6 lines
where all this migration work comes handy is if we say that we want our device to all just do what the
spec says. No vendor specific tricks. And I find it exciting that there are people who want to work on this instead of each vendor wasting man hours on their own almost the same but slightly different driver.I agree
Quoted 6 lines
I personally think this patch is not great for the trap use-case either. Why? For example if device is somewhat slow then it will take it hundreds of milliseconds to synchronize the whole guest memory, and blocking reset means blocking e.g. guest boot. I was wrong about soft lockup btw - linux does msleep which I think means no soft lockups. But boot is blocked and modules are not loaded.
Quoted 3 lines
I am not sure SUSPEND can block RESET, I think reset can take immediate actions, because
once reset, whether suspended does not matter.
Quoted 8 lines
No, because if you don't suspend device will keep changing memory. You need to
1. suspend
2. get all dirty memory synced
3. resetReset earlier will corrupt guest memory.
IMHO, it may be fine to lose the dirty pages during reset, because without an interrupt, the driver won't process the dirty pages, they are still considered as unused(even not all zero pages) by CPU, so nothing corrupted.
And if the driver resets the device, it will reinitialize the device and re-config the virtqueue including the ring buffer.
Quoted 2 lines
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 65 lines · Lingshan
Quoted 62 lines · Michael S. Tsirkin
Quoted 51 lines · Lingshan
Quoted 27 lines · Michael S. Tsirkin
Quoted 26 lines · Parav Pandit
Quoted 13 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:42 PMQuoted 7 lines · Parav Pandit
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
Quoted 9 lines
when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?You meant the gateway is not in the device, right?
I likely didn't understand. I don't see a relation to timing.
Quoted 8 lines
Quoted 2 lines
When the device reset is not trapped by the hypervisor, most things does not work, it requires trapping other things to like cvq, device registers and more. It may be fine for those use case, but it does not fullfill the requirement of passthrough mode of hw.
I wish we'd just stop using the term, it just confuses everyone.
I feel the point worth making is that currently, all this job is done by hypervisors. And they manage fine! vdpa really truly does not need the SUSPEND bit because it knows about devices and it
can just use whatever it wants in any vendor specific way it wants.So true, this is exact what Intel implements in some productions.
Quoted 6 lines
where all this migration work comes handy is if we say that we want our device to all just do what the
spec says. No vendor specific tricks. And I find it exciting that there are people who want to work on this instead of each vendor wasting man hours on their own almost the same but slightly different driver.I agree
Quoted 6 lines
I personally think this patch is not great for the trap use-case either. Why? For example if device is somewhat slow then it will take it hundreds of milliseconds to synchronize the whole guest memory, and blocking reset means blocking e.g. guest boot. I was wrong about soft lockup btw - linux does msleep which I think means no soft lockups. But boot is blocked and modules are not loaded.
Quoted 3 lines
I am not sure SUSPEND can block RESET, I think reset can take immediate actions, because
once reset, whether suspended does not matter.No, because if you don't suspend device will keep changing memory. You need to
1. suspend
2. get all dirty memory synced
3. reset
Quoted 8 lines
Quoted 1 line
Reset earlier will corrupt guest memory.
IMHO, it may be fine to lose the dirty pages during reset, because without an interrupt, the driver won't process the dirty pages, they are still considered as unused(even not all zero pages) by CPU, so nothing corrupted.
And if the driver resets the device, it will reinitialize the device and re-config the virtqueue including the ring buffer.
It's too late to invent new consistency semantics for virtio.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 65 lines · Michael S. Tsirkin
Quoted 64 lines · Lingshan
Quoted 62 lines · Michael S. Tsirkin
Quoted 50 lines · Lingshan
Quoted 27 lines · Michael S. Tsirkin
Quoted 26 lines · Parav Pandit
Quoted 13 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:42 PMQuoted 7 lines · Parav Pandit
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
Quoted 9 lines
when it resets the device all the things stored in the device are lost.
I think the idea is that when this gateway is in the device then device reset has to trap. At a high level, ok. But then what?
Is a full scan of all memory required until device reset is complete? Drivers currently tend to busy poll the reset register, if this takes very long we might start seeing soft lockup messages. What is the idea then? Maybe for this we need a separate weaker reset that does not touch this capability?You meant the gateway is not in the device, right?
I likely didn't understand. I don't see a relation to timing.
Quoted 8 lines
Quoted 2 lines
When the device reset is not trapped by the hypervisor, most things does not work, it requires trapping other things to like cvq, device registers and more. It may be fine for those use case, but it does not fullfill the requirement of passthrough mode of hw.
I wish we'd just stop using the term, it just confuses everyone.
I feel the point worth making is that currently, all this job is done by hypervisors. And they manage fine! vdpa really truly does not need the SUSPEND bit because it knows about devices and it
can just use whatever it wants in any vendor specific way it wants.So true, this is exact what Intel implements in some productions.
Quoted 6 lines
where all this migration work comes handy is if we say that we want our device to all just do what the
spec says. No vendor specific tricks. And I find it exciting that there are people who want to work on this instead of each vendor wasting man hours on their own almost the same but slightly different driver.I agree
Quoted 6 lines
I personally think this patch is not great for the trap use-case either. Why? For example if device is somewhat slow then it will take it hundreds of milliseconds to synchronize the whole guest memory, and blocking reset means blocking e.g. guest boot. I was wrong about soft lockup btw - linux does msleep which I think means no soft lockups. But boot is blocked and modules are not loaded.
Quoted 3 lines
I am not sure SUSPEND can block RESET, I think reset can take immediate actions, because
once reset, whether suspended does not matter.No, because if you don't suspend device will keep changing memory. You need to
1. suspend
2. get all dirty memory synced
3. resetReset earlier will corrupt guest memory.
Quoted 8 lines
Quoted 7 lines
IMHO, it may be fine to lose the dirty pages during reset, because without an interrupt, the driver won't process the dirty pages, they are still considered as unused(even not all zero pages) by CPU, so nothing corrupted.
And if the driver resets the device, it will reinitialize the device and re-config the virtqueue including the ring buffer.
It's too late to invent new consistency semantics for virtio.
I think when reset, the legacy vring buffer can be considered as invalid.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Parav PanditQuoted 39 lines · Parav Pandit
Quoted 39 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 3, 2023 8:33 PMQuoted 28 lines · Parav Pandit
Quoted 28 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMReview
Quoted 3 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
(quoted diff) +2
-0+ The driver use this to set the address of the bitmap which records +thedirty pages
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 4 lines
transport-pci.tex +4
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so on +in alinear manner.
Review
Quoted 3 lines
(quoted diff) +3
-0+ When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating +thepage is dirty.
Review
Quoted 10 lines
+\item[\field{bitmap_length}]
(quoted diff) +9
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory +Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when +reportingdirty pages.
Quoted 4 lines
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ +To prevent a read-modify-write procedure, if a memory page is +dirty,It is not to prevent; it is just not possible to do racy RMW. 😊
if you understand what is a atomic routine, you will not call it racy.
Quoted 2 lines
Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
Quoted 8 lines
Quoted 1 line
why? and this is optional.
Because device cannot set individual bits in atomic way for same byte read by the cpu.
1. device read the byte that had bit 0 and 4 set.
2. cpu atomically clear these bits.
3. device wrote bits 0, 4, and new bits 2 and 3.
4. cpu now transferred page 0 and 4 again.Optional thing also needs to work. :)
Do you know both CPU and device actually don't read bit, they read bytes???? Do you know RC connected to memory controller????
Do you know there are locked transaction and atomic operations in PCI???
Do you know there are atomic read/write/clear even read and clear and so on in CPU ISA????
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Secondly the bitmap array is function is for full guest memory size, while
there is lot of sparce region now and also in future.
Quoted 1 line
This is the second problem.
did you see
gra_powerand its comments?
gra_powersays the page size.
Not the sparce multiple ranges of the guest memory. Device endup tracking uninterested area as well.
increase gra_power can reduce bitmap size, right?
Totally up to the hypervisor, right?
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
This is exactly why I asked you to review the page write recording series of
admin commands and comment.
Quoted 3 lines
And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth
Quoted 8 lines
Quoted 7 lines
explosion, admin commands of [1] stands better.
Quoted 1 line
If you do [1] on the member device also using its AQ in future, it will work for
non-passthrough case.
Quoted 2 lines
If you build non-passthrough live migration using [1], also it will work. So I don’t see any point of this series anymore.
As Jason pointed out, there are many problems in your proposal, you should answer there. I don't need to repeat his words and duplicate the discussions.
Many are already addressed in v3.
interesting, does your V3 support nested?
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct control of the hypervisor.
The device is directly controlled by the guest including the device status and when it resets the device all the things stored in the device are lost.
have you seen PASID? and if the device reset, it has to forget everything as expected, right?
Quoted 2 lines
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they are not init time registers not following the Appendix B guidelines.
endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Again, if you want to fix Appendix B, OK.
Quoted 3 lines
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
see above, the first reply.
Quoted 4 lines
5. All the device context needed for passthrough based hypervisor for a device type specific is missing. All of those can be used for non-passthrough as well.
[1] https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085.html
If you want to discuss this again, I don't want to wast time but only asking you whether you want to define virtio-fs device context
Quoted 8 lines
Quoted 4 lines
And I
remember this is a point-less topic as MST ever wants to mute another "pass- through" thread.No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.
Let me quote MST's reply here:
"I feel this discussion will keep meandering because the terminology is vague. There's no single thing that is called "passthrough" - vendors just build what is expedient with current hardware and software. Nvidia has a bunch of people working on vfio so they call that passthrough, Red Hat has people working on VDPA and they call that passthrough, etc.
Before I mute this discussion for good, does anyone here have any feeling progress is made? What kind of progress? "
So please don't discuss on pass-through anymore.
It seems only you need to develop the knowledge
Quoted 17 lines
Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 4 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, which +encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 9 lines
Quoted 9 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
see above
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 48 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:22 AMQuoted 36 lines · Parav Pandit
Quoted 36 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 3, 2023 8:33 PMQuoted 32 lines · Parav Pandit
Quoted 28 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMReview
Quoted 3 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
(quoted diff) +2
-0+ The driver use this to set the address of the bitmap which +records thedirty pages
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options /
Quoted 4 lines
transport-pci.tex +4
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so +on in alinear manner.
Review
Quoted 3 lines
(quoted diff) +3
-0+ When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating +thepage is dirty.
Review
Quoted 10 lines
+\item[\field{bitmap_length}]
(quoted diff) +9
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / +Memory Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when +reportingdirty pages.
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ +To prevent a read-modify-write procedure, if a memory page is +dirty,It is not to prevent; it is just not possible to do racy RMW. 😊
Quoted 5 lines
Quoted 4 lines
if you understand what is a atomic routine, you will not call it racy.
Quoted 2 lines
Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
why? and this is optional.
Because device cannot set individual bits in atomic way for same byte read by
Quoted 8 lines
the cpu.
Quoted 6 lines
1. device read the byte that had bit 0 and 4 set.
2. cpu atomically clear these bits.
3. device wrote bits 0, 4, and new bits 2 and 3.
4. cpu now transferred page 0 and 4 again.Optional thing also needs to work. :)
Do you know both CPU and device actually don't read bit, they read bytes????
Yes. this is why atomic_OR is not possible on pcie.
Quoted 1 line
Do you know RC connected to memory controller????
Yes.
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Quoted 2 lines
Do you know there are atomic read/write/clear even read and clear and so on in CPU ISA????
Read is always atomic from cpu.
I didn’t know about read_and_clear atomic ISA. This combined with pci future support for atomic_or. If you already know a Linux kernel api for atomic_read_and_clear, please share.
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Secondly the bitmap array is function is for full guest memory size, while
there is lot of sparce region now and also in future.
Quoted 1 line
This is the second problem.
did you see
gra_powerand its comments?
gra_powersays the page size.
Not the sparce multiple ranges of the guest memory. Device endup tracking uninterested area as well.increase
gra_powercan reduce bitmap size, right?
Totally up to the hypervisor, right?
Yes, and that can increase the amount of memory.
The way I understood is, if gra_power is 2MB, than whole 2MB page to be considered dirty, even if 8KB was dirty. Did I understand it right?
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 3 lines
This is exactly why I asked you to review the page write recording series of
admin commands and comment.
Quoted 4 lines
And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth
explosion, admin commands of [1] stands better.
Quoted 2 lines
If you do [1] on the member device also using its AQ in future, it will work for
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
non-passthrough case.
Quoted 2 lines
If you build non-passthrough live migration using [1], also it will work. So I don’t see any point of this series anymore.
As Jason pointed out, there are many problems in your proposal, you should answer there. I don't need to repeat his words and duplicate the
discussions.
Quoted 1 line
Many are already addressed in v3.
interesting, does your V3 support nested?
Not directly.
Is it similar to cpu PML which does not supported nested.
One can always implement nested using some emulation.
The second option for high performance would be allow SR-IOV cap on the VF and support true nesting using existing proposal of v3.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475
.h
tml
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
you still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directcontrol of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
when it resets the device all the things stored in the device are lost. have you seen PASID? and if the device reset, it has to forget everything as expected, right?
PASID does not help with the reset. Because as you told reset, resets everything. PASID does not bifurcate the device common control which is not linked to any PASID.
Quoted 9 lines
Quoted 2 lines
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Device dirty page tracking is start/stop command to be done by the hypervisor. So when guest is resetting the device, it stopped the DMA initiated by the hypervisor. This fundamentally breaks things.
Quoted 7 lines
Again, if you want to fix Appendix B, OK.
Quoted 3 lines
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
see above, the first reply.
Quoted 1 line
Quoted 8 lines
Quoted 1 line
5. All the device context needed for passthrough based hypervisor for a
device type specific is missing.
Quoted 4 lines
All of those can be used for non-passthrough as well.
[1]
https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085.h
tmlIf you want to discuss this again, I don't want to wast time but only asking you whether you want to define virtio-fs device context
It will be defined in future.
And if virtio-fs was not written with migration in mind, may be one will invent virtio-fs2.
Quoted 17 lines
Quoted 8 lines
Quoted 4 lines
And I
remember this is a point-less topic as MST ever wants to mute another "pass- through" thread.No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.Let me quote MST's reply here:
"I feel this discussion will keep meandering because the terminology is vague. There's no single thing that is called "passthrough" - vendors just build what is expedient with current hardware and software. Nvidia has a bunch of people working on vfio so they call that passthrough, Red Hat has people working on VDPA and they call that passthrough, etc.
Quoted 4 lines
Before I mute this discussion for good, does anyone here have any feeling progress is made? What kind of progress? "
So please don't discuss on pass-through anymore.
I don’t want to discuss the pros and cons of passthrough vs, vdpa, as usual.
V3 covers broader use case of passthrough, hence once can always implement trap+emulation instead of passthrough. V3 already indicates that other variants of the passthrough can be done as well or can be extended. So please explore if that fits your vdpa need.
Quoted 26 lines
It seems only you need to develop the knowledge
Quoted 17 lines
Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Review
Quoted 4 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, which +encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 9 lines
Quoted 9 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
see above
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 60 lines · Parav Pandit
Quoted 47 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:22 AMQuoted 36 lines · Parav Pandit
Quoted 36 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 3, 2023 8:33 PMQuoted 32 lines · Parav Pandit
Quoted 28 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMReview
Quoted 3 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
(quoted diff) +2
-0+ The driver use this to set the address of the bitmap which +records thedirty pages
Review
Quoted 4 lines
(quoted diff) +4
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so +on in alinear manner.
Review
Quoted 3 lines
(quoted diff) +3
-0+ When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating +thepage is dirty.
Review
Quoted 10 lines
+\item[\field{bitmap_length}]
(quoted diff) +9
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / +Memory Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when +reportingdirty pages.
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ +To prevent a read-modify-write procedure, if a memory page is +dirty,It is not to prevent; it is just not possible to do racy RMW. 😊
Quoted 5 lines
Quoted 4 lines
if you understand what is a atomic routine, you will not call it racy.
Quoted 2 lines
Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
why? and this is optional.
Because device cannot set individual bits in atomic way for same byte read by
Quoted 8 lines
the cpu.
Quoted 6 lines
1. device read the byte that had bit 0 and 4 set.
2. cpu atomically clear these bits.
3. device wrote bits 0, 4, and new bits 2 and 3.
4. cpu now transferred page 0 and 4 again.Optional thing also needs to work. :)
Do you know both CPU and device actually don't read bit, they read bytes????
Yes. this is why
atomic_ORis not possible on pcie.Quoted 1 line
Do you know RC connected to memory controller????
Yes.
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Quoted 8 lines
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Quoted 2 lines
Do you know there are atomic read/write/clear even read and clear and so on in CPU ISA????
Read is always atomic from cpu.
I didn’t know aboutread_and_clearatomic ISA. This combined with pci future support foratomic_or. If you already know a Linux kernel api foratomic_read_and_clear, please share.
To answer all questions above, you should read PCI spec and CPU SDM, we don't copy and paste the content here, nobody develop their knowledge this way.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
Secondly the bitmap array is function is for full guest memory size, while
there is lot of sparce region now and also in future.
Quoted 1 line
This is the second problem.
did you see
gra_powerand its comments?
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
gra_powersays the page size.
Not the sparce multiple ranges of the guest memory. Device endup tracking uninterested area as well.increase
gra_powercan reduce bitmap size, right?
Totally up to the hypervisor, right?Yes, and that can increase the amount of memory.
The way I understood is, ifgra_poweris 2MB, than whole 2MB page to be considered dirty, even if 8KB was dirty. Did I understand it right?
Do you know DMA are very likely to write a neighbor page? Do you know why huge page is introduced?
Hint: not only for reduce TLB miss.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 3 lines
This is exactly why I asked you to review the page write recording series of
admin commands and comment.
Quoted 4 lines
And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth
explosion, admin commands of [1] stands better.
Quoted 2 lines
If you do [1] on the member device also using its AQ in future, it will work for
non-passthrough case.
Quoted 2 lines
If you build non-passthrough live migration using [1], also it will work. So I don’t see any point of this series anymore.
As Jason pointed out, there are many problems in your proposal, you should answer there. I don't need to repeat his words and duplicate the
Quoted 7 lines
Quoted 3 lines
discussions.
Quoted 1 line
Many are already addressed in v3.
interesting, does your V3 support nested?
Not directly.
Is it similar to cpu PML which does not supported nested.
One can always implement nested using some emulation.
The second option for high performance would be allow SR-IOV cap on the VF and support true nesting using existing proposal of v3.
If your proposal does not support nested, then it is incomplete.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00475
.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in direct
Quoted 7 lines
Quoted 5 lines
control of the hypervisor.
Quoted 1 line
The device is directly controlled by the guest including the device status and
when it resets the device all the things stored in the device are lost. have you seen PASID? and if the device reset, it has to forget everything as expected, right?
PASID does not help with the reset. Because as you told reset, resets everything. PASID does not bifurcate the device common control which is not linked to any PASID.
PASID means some facilities can be isolated. When reset, the device forget everything.
Quoted 11 lines
Quoted 8 lines
Quoted 2 lines
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 1 line
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Device dirty page tracking is start/stop command to be done by the hypervisor. So when guest is resetting the device, it stopped the DMA initiated by the hypervisor. This fundamentally breaks things.
Why? When device resets, do you want to keep tracking dirty pages????
Quoted 7 lines
Quoted 7 lines
Again, if you want to fix Appendix B, OK.
Quoted 2 lines
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
see above, the first reply.
Quoted 1 line
5. All the device context needed for passthrough based hypervisor for a
device type specific is missing.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
All of those can be used for non-passthrough as well.
[1]
https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085.h
tmlIf you want to discuss this again, I don't want to wast time but only asking you whether you want to define virtio-fs device context
It will be defined in future.
And if virtio-fs was not written with migration in mind, may be one will invent virtio-fs2.
don't say future, talk is cheap, show me the code.
Quoted 16 lines
Quoted 16 lines
Quoted 8 lines
Quoted 4 lines
And I
remember this is a point-less topic as MST ever wants to mute another "pass- through" thread.No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.Let me quote MST's reply here:
"I feel this discussion will keep meandering because the terminology is vague. There's no single thing that is called "passthrough" - vendors just build what is expedient with current hardware and software. Nvidia has a bunch of people working on vfio so they call that passthrough, Red Hat has people working on VDPA and they call that passthrough, etc.
Quoted 8 lines
Quoted 4 lines
Before I mute this discussion for good, does anyone here have any feeling progress is made? What kind of progress? "
So please don't discuss on pass-through anymore.
I don’t want to discuss the pros and cons of passthrough vs, vdpa, as usual.
V3 covers broader use case of passthrough, hence once can always implement trap+emulation instead of passthrough. V3 already indicates that other variants of the passthrough can be done as well or can be extended. So please explore if that fits your vdpa need.
So, please no pass-through discussion anymore.
Quoted 18 lines
Quoted 18 lines
It seems only you need to develop the knowledge
Quoted 16 lines
Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, which +encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 9 lines
Quoted 9 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
see above
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 74 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PMQuoted 13 lines · Parav Pandit
Quoted 13 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:22 AMQuoted 7 lines · Parav Pandit
Quoted 7 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 3, 2023 8:33 PMQuoted 3 lines · Parav Pandit
Quoted 3 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Zhu Lingshan
Review
Quoted 3 lines
+\item[\field{bitmap_addr}]
(quoted diff) +2
-0+ The driver use this to set the address of the bitmap which +records thedirty pages
Review
Quoted 2 lines
(quoted diff) +2
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 inthe bitmap
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ reprsents page 0 at address 0, bit 1 represents page 1, and so +on in alinear manner.
Review
Quoted 1 line
(quoted diff) +1
-0+ When \field{enable} is set to 1 and the device writes to amemory page,
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ the device MUST set the corresponding bit to 1 which +indicating thepage is dirty.
Review
Quoted 10 lines
+\item[\field{bitmap_length}]
(quoted diff) +9
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / +Memory Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when +reportingdirty pages.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ +To prevent a read-modify-write procedure, if a memory page is +dirty,It is not to prevent; it is just not possible to do racy RMW. 😊
if you understand what is a atomic routine, you will not call it racy.
Quoted 2 lines
Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
why? and this is optional.
Because device cannot set individual bits in atomic way for same byte read by
Quoted 8 lines
Quoted 8 lines
the cpu.
Quoted 6 lines
1. device read the byte that had bit 0 and 4 set.
2. cpu atomically clear these bits.
3. device wrote bits 0, 4, and new bits 2 and 3.
4. cpu now transferred page 0 and 4 again.Optional thing also needs to work. :)
Do you know both CPU and device actually don't read bit, they read
bytes????
Quoted 10 lines
Yes. this is why
atomic_ORis not possible on pcie.Quoted 1 line
Do you know RC connected to memory controller????
Yes.
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Quoted 2 lines
Do you know there are atomic read/write/clear even read and clear and so on in CPU ISA????
Quoted 7 lines
Quoted 2 lines
Read is always atomic from cpu.
I didn’t know aboutread_and_clearatomic ISA. This combined with pci futuresupport for
atomic_or.Quoted 1 line
If you already know a Linux kernel api for
atomic_read_and_clear, pleaseshare.
To answer all questions above, you should read PCI spec and CPU SDM, we don't copy and paste the content here, nobody develop their knowledge this way.
I read the pci spec and I see only 3 operations which does not have atomic or. I will try to find for the CPU instruction on read_and_clear that you suggested. Thanks for the suggestion.
Quoted 75 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Secondly the bitmap array is function is for full guest memory size, while
there is lot of sparce region now and also in future.
Quoted 1 line
This is the second problem.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
did you see
gra_powerand its comments?
gra_powersays the page size.
Not the sparce multiple ranges of the guest memory. Device endup tracking uninterested area as well.increase
gra_powercan reduce bitmap size, right?
Totally up to the hypervisor, right?Yes, and that can increase the amount of memory.
The way I understood is, ifgra_poweris 2MB, than whole 2MB page to beconsidered dirty, even if 8KB was dirty.
Quoted 1 line
Did I understand it right?
Do you know DMA are very likely to write a neighbor page? Do you know why huge page is introduced?
Hint: not only for reduce TLB miss.Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 3 lines
This is exactly why I asked you to review the page write recording series of
admin commands and comment.
Quoted 4 lines
And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth
explosion, admin commands of [1] stands better.
Quoted 2 lines
If you do [1] on the member device also using its AQ in future, it will work for
non-passthrough case.
Quoted 2 lines
If you build non-passthrough live migration using [1], also it will work. So I don’t see any point of this series anymore.
As Jason pointed out, there are many problems in your proposal, you should answer there. I don't need to repeat his words and duplicate the
Quoted 7 lines
Quoted 3 lines
discussions.
Quoted 1 line
Many are already addressed in v3.
interesting, does your V3 support nested?
Not directly.
Is it similar to cpu PML which does not supported nested.
One can always implement nested using some emulation.
The second option for high performance would be allow SR-IOV cap on the VFand support true nesting using existing proposal of v3. If your proposal does not support nested, then it is incomplete.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Quoted 6 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75
.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directQuoted 7 lines
Quoted 6 lines
control of the hypervisor.
Quoted 2 lines
The device is directly controlled by the guest including the device status and
when it resets the device all the things stored in the device are lost. have you seen PASID? and if the device reset, it has to forget everything as expected, right?
PASID does not help with the reset. Because as you told reset, resets
everything.
Quoted 1 line
PASID does not bifurcate the device common control which is not linked to any
PASID.
PASID means some facilities can be isolated. When reset, the device forget everything.Quoted 9 lines
Quoted 9 lines
Quoted 2 lines
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Quoted 6 lines
Quoted 1 line
Device dirty page tracking is start/stop command to be done by the
hypervisor.
Quoted 1 line
So when guest is resetting the device, it stopped the DMA initiated by the
hypervisor.
Quoted 1 line
This fundamentally breaks things.
Why? When device resets, do you want to keep tracking dirty pages????
Yes, when the device resets, before that event occurred, all the pages which were dirtied, must be migrated. And after reset also new page tracking to continue.
Quoted 74 lines
Quoted 14 lines
Quoted 14 lines
Again, if you want to fix Appendix B, OK.
Quoted 2 lines
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
see above, the first reply.
Quoted 2 lines
5. All the device context needed for passthrough based hypervisor for a
device type specific is missing.
Quoted 5 lines
All of those can be used for non-passthrough as well.
[1]
https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085
.h
tmlQuoted 4 lines
Quoted 2 lines
If you want to discuss this again, I don't want to wast time but only asking you whether you want to define virtio-fs device context
It will be defined in future.
And if virtio-fs was not written with migration in mind, may be one will inventvirtio-fs2.
don't say future, talk is cheap, show me the code.Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
Quoted 5 lines
And I
remember this is a point-less topic as MST ever wants to mute another
"pass- through" thread.No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.Let me quote MST's reply here:
"I feel this discussion will keep meandering because the terminology isvague.
Quoted 6 lines
Quoted 6 lines
There's no single thing that is called "passthrough" - vendors just build what is expedient with current hardware and software. Nvidia has a bunch of people working on vfio so they call that passthrough, Red Hat has people working on VDPA and they call that passthrough, etc.
Quoted 6 lines
Quoted 4 lines
Before I mute this discussion for good, does anyone here have any feeling progress is made? What kind of progress? "
So please don't discuss on pass-through anymore.
I don’t want to discuss the pros and cons of passthrough vs, vdpa, as usual. V3 covers broader use case of passthrough, hence once can always implement
trap+emulation instead of passthrough.
Quoted 1 line
V3 already indicates that other variants of the passthrough can be done as
well or can be extended.
Quoted 1 line
So please explore if that fits your vdpa need.
So, please no pass-through discussion anymore.
Quoted 25 lines
Quoted 25 lines
It seems only you need to develop the knowledge
Quoted 16 lines
Quoted 16 lines
Quoted 6 lines
Quoted 6 lines
Review
Quoted 3 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, +which encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 9 lines
Quoted 9 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
see above
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 1 line · Parav Pandit
I read the pci spec and I see only 3 operations which does not have atomic or.
CAS+retry can be used to implement any atomics including atomic or.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 7 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:36 PMQuoted 1 line · Parav Pandit
I read the pci spec and I see only 3 operations which does not have atomic or.
CAS+retry can be used to implement any atomics including atomic or.
Yes, we considered it. the PCI backpressure is lot that negates the value of such retries for such small transactions.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 9 lines · Parav Pandit
Quoted 7 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:36 PMQuoted 1 line · Parav Pandit
I read the pci spec and I see only 3 operations which does not have atomic or.
CAS+retry can be used to implement any atomics including atomic or.
Yes, we considered it. the PCI backpressure is lot that negates the value of such retries for such small transactions.
if there's some locality device can buffer these up maybe, though of course the chances of a failure increase then.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Parav PanditQuoted 154 lines · Parav Pandit
Quoted 72 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PMQuoted 12 lines · Parav Pandit
Quoted 12 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 9:22 AMQuoted 7 lines · Parav Pandit
Quoted 7 lines
From: Zhu, Lingshan <[email protected]>
Sent: Friday, November 3, 2023 8:33 PMQuoted 3 lines · Parav Pandit
Quoted 3 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Friday, November 3, 2023 4:20 PMQuoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines · Zhu Lingshan
Review
Quoted 3 lines
+\item[\field{bitmap_addr}]
(quoted diff) +2
-0+ The driver use this to set the address of the bitmap which +records thedirty pages
Review
Quoted 2 lines
(quoted diff) +2
-0+ caused by the device. + Each bit in the bitmap represents one memory page, bit 0 inthe bitmap
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ reprsents page 0 at address 0, bit 1 represents page 1, and so +on in alinear manner.
Review
Quoted 1 line
(quoted diff) +1
-0+ When \field{enable} is set to 1 and the device writes to amemory page,
Quoted 24 lines
Quoted 24 lines
Quoted 24 lines
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ the device MUST set the corresponding bit to 1 which +indicating thepage is dirty.
Review
Quoted 10 lines
+\item[\field{bitmap_length}]
(quoted diff) +9
-0+ The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker +Capability}{Virtio Transport Options / Virtio Over PCI Bus / +Memory Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when +reportingdirty pages.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Review
Quoted 3 lines
(quoted diff) +3
-0+ +To prevent a read-modify-write procedure, if a memory page is +dirty,It is not to prevent; it is just not possible to do racy RMW. 😊
if you understand what is a atomic routine, you will not call it racy.
Quoted 2 lines
Hence to work around you propose to mark all pages dirty. Too bad. This just does not work.
why? and this is optional.
Because device cannot set individual bits in atomic way for same byte read by
Quoted 8 lines
Quoted 8 lines
the cpu.
Quoted 6 lines
1. device read the byte that had bit 0 and 4 set.
2. cpu atomically clear these bits.
3. device wrote bits 0, 4, and new bits 2 and 3.
4. cpu now transferred page 0 and 4 again.Optional thing also needs to work. :)
Do you know both CPU and device actually don't read bit, they read
bytes????
Quoted 10 lines
Yes. this is why
atomic_ORis not possible on pcie.Quoted 1 line
Do you know RC connected to memory controller????
Yes.
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Quoted 2 lines
Do you know there are atomic read/write/clear even read and clear and so on in CPU ISA????
Quoted 7 lines
Quoted 2 lines
Read is always atomic from cpu.
I didn’t know aboutread_and_clearatomic ISA. This combined with pci futuresupport for
atomic_or.Quoted 1 line
If you already know a Linux kernel api for
atomic_read_and_clear, pleaseshare.
To answer all questions above, you should read PCI spec and CPU SDM, we don't copy and paste the content here, nobody develop their knowledge this way.I read the pci spec and I see only 3 operations which does not have atomic or. I will try to find for the CPU instruction on
read_and_clearthat you suggested. Thanks for the suggestion.Quoted 71 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Secondly the bitmap array is function is for full guest memory size, while
there is lot of sparce region now and also in future.
Quoted 1 line
This is the second problem.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
did you see
gra_powerand its comments?
gra_powersays the page size.
Not the sparce multiple ranges of the guest memory. Device endup tracking uninterested area as well.increase
gra_powercan reduce bitmap size, right?
Totally up to the hypervisor, right?Yes, and that can increase the amount of memory.
The way I understood is, ifgra_poweris 2MB, than whole 2MB page to beconsidered dirty, even if 8KB was dirty.
Quoted 1 line
Did I understand it right?
Do you know DMA are very likely to write a neighbor page? Do you know why huge page is introduced?
Hint: not only for reduce TLB miss.Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
Quoted 2 lines
This is exactly why I asked you to review the page write recording series of
admin commands and comment.
Quoted 4 lines
And you never commented with sheer ignorance.
So clearly the start stop method for specific range and without bandwidth
explosion, admin commands of [1] stands better.
Quoted 2 lines
If you do [1] on the member device also using its AQ in future, it will work for
non-passthrough case.
Quoted 2 lines
If you build non-passthrough live migration using [1], also it will work. So I don’t see any point of this series anymore.
As Jason pointed out, there are many problems in your proposal, you should answer there. I don't need to repeat his words and duplicate the
Quoted 7 lines
Quoted 3 lines
discussions.
Quoted 1 line
Many are already addressed in v3.
interesting, does your V3 support nested?
Not directly.
Is it similar to cpu PML which does not supported nested.
One can always implement nested using some emulation.
The second option for high performance would be allow SR-IOV cap on the VFand support true nesting using existing proposal of v3. If your proposal does not support nested, then it is incomplete.
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
[1]
https://lists.oasis-open.org/archives/virtio-comment/202310/msg004
75
.h
tmlyou still need to explain why this does not work for pass-through.
It does not work for following reasons.
1. Because all the fields that put on the member device are not in directQuoted 7 lines
Quoted 6 lines
control of the hypervisor.
Quoted 2 lines
The device is directly controlled by the guest including the device status and
when it resets the device all the things stored in the device are lost. have you seen PASID? and if the device reset, it has to forget everything as expected, right?
PASID does not help with the reset. Because as you told reset, resets
everything.
Quoted 1 line
PASID does not bifurcate the device common control which is not linked to any
PASID.
PASID means some facilities can be isolated. When reset, the device forget everything.Quoted 8 lines
Quoted 8 lines
Quoted 1 line
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Device dirty page tracking is start/stop command to be done by the
hypervisor.
Quoted 1 line
So when guest is resetting the device, it stopped the DMA initiated by the
hypervisor.
Quoted 1 line
This fundamentally breaks things.
Why? When device resets, do you want to keep tracking dirty pages????
Yes, when the device resets, before that event occurred, all the pages which were dirtied, must be migrated. And after reset also new page tracking to continue.
That depends on whether there is an interrupt for the dirty pages. If there is an interrupt, then the guest owns the pages
Quoted 63 lines
Quoted 63 lines
Quoted 13 lines
Quoted 13 lines
Again, if you want to fix Appendix B, OK.
Quoted 2 lines
4. bitmap based dirty tracking is not atomic between cpu and device. Hence, it is racy.
see above, the first reply.
Quoted 2 lines
5. All the device context needed for passthrough based hypervisor for a
device type specific is missing.
Quoted 5 lines
All of those can be used for non-passthrough as well.
[1]
https://lists.oasis-open.org/archives/virtio-comment/202311/msg00085
.h
tmlQuoted 4 lines
Quoted 2 lines
If you want to discuss this again, I don't want to wast time but only asking you whether you want to define virtio-fs device context
It will be defined in future.
And if virtio-fs was not written with migration in mind, may be one will inventvirtio-fs2.
don't say future, talk is cheap, show me the code.Quoted 10 lines
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines
And I
remember this is a point-less topic as MST ever wants to mute another
"pass- through" thread.No. he did not say that.
He meant to not endlessly debate which one is better.
He clearly said, try to see if you can make multiple hypervisor model work. And your series shows a clear ignorance of his guidance.Let me quote MST's reply here:
"I feel this discussion will keep meandering because the terminology isvague.
Quoted 6 lines
Quoted 6 lines
There's no single thing that is called "passthrough" - vendors just build what is expedient with current hardware and software. Nvidia has a bunch of people working on vfio so they call that passthrough, Red Hat has people working on VDPA and they call that passthrough, etc.
Quoted 6 lines
Quoted 4 lines
Before I mute this discussion for good, does anyone here have any feeling progress is made? What kind of progress? "
So please don't discuss on pass-through anymore.
I don’t want to discuss the pros and cons of passthrough vs, vdpa, as usual. V3 covers broader use case of passthrough, hence once can always implement
trap+emulation instead of passthrough.
Quoted 1 line
V3 already indicates that other variants of the passthrough can be done as
well or can be extended.
Quoted 1 line
So please explore if that fits your vdpa need.
So, please no pass-through discussion anymore.
Quoted 16 lines
Quoted 16 lines
It seems only you need to develop the knowledge
Quoted 15 lines
Quoted 15 lines
Quoted 5 lines
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+optionally the device is permitted to set the entire byte, +which encompassesthe relevant bit, to 1.
Review
Quoted 2 lines
(quoted diff) +2
-0+ +The device MAY increase \field{gra_power} to reduce\field{bitmap_length}.
Quoted 9 lines
Quoted 9 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +The device must ignore any writes to \field{pasid} if PASID +Extended Capability is absent or the PASID functionality is +disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is
small: you will end up scanning and re-scanning all of bitmap. And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Yeah.
And device does not even know previously reported pages are read by driveror not. All guess work game for driver and device. see my reply to him
Please see above reply.
see above
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 10 lines · Lingshan
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Device dirty page tracking is start/stop command to be done by the
hypervisor.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
So when guest is resetting the device, it stopped the DMA initiated by the
hypervisor.
Quoted 1 line
This fundamentally breaks things.
Why? When device resets, do you want to keep tracking dirty pages????
Yes, when the device resets, before that event occurred, all the pages which were dirtied, must be migrated. And after reset also new page tracking to continue.
That depends on whether there is an interrupt for the dirty pages. If there is an interrupt, then the guest owns the pages
Not in the virtio model, guest owns the memory once buffer has been used.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 12 lines · Michael S. Tsirkin
Quoted 11 lines · Lingshan
Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Device dirty page tracking is start/stop command to be done by the
hypervisor.
Quoted 1 line
So when guest is resetting the device, it stopped the DMA initiated by the
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
hypervisor.
Quoted 1 line
This fundamentally breaks things.
Why? When device resets, do you want to keep tracking dirty pages????
Yes, when the device resets, before that event occurred, all the pages which were dirtied, must be migrated. And after reset also new page tracking to continue.
That depends on whether there is an interrupt for the dirty pages. If there is an interrupt, then the guest owns the pages
Not in the virtio model, guest owns the memory once buffer has been used.
Yes and even better, interrupt happens after buffers marked as used.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 16 lines · Lingshan
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines · Lingshan
Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Device dirty page tracking is start/stop command to be done by the
hypervisor.
Quoted 1 line
So when guest is resetting the device, it stopped the DMA initiated by the
hypervisor.
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
This fundamentally breaks things.
Why? When device resets, do you want to keep tracking dirty pages????
Yes, when the device resets, before that event occurred, all the pages which were dirtied, must be migrated. And after reset also new page tracking to continue.
That depends on whether there is an interrupt for the dirty pages. If there is an interrupt, then the guest owns the pages
Not in the virtio model, guest owns the memory once buffer has been used.
Yes and even better, interrupt happens after buffers marked as used.
But guest owns memory earlier and you can not change it after this point.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 18 lines · Michael S. Tsirkin
Quoted 17 lines · Lingshan
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Lingshan
Quoted 14 lines
Quoted 14 lines
Quoted 9 lines
Quoted 8 lines
Quoted 1 line
2. the PCI FLR is clearing all the registers you exposed here.
see above
Quoted 2 lines
3. Endless expansion of config registers of dirty tracking is not scalable, as they
are not init time registers not following the Appendix B guidelines. endless expansion?? It is a complete set of dirty page tracking, right???? have you see this cap only controls? The device DMA writes the bitmap, not by registers.
Device dirty page tracking is start/stop command to be done by the
hypervisor.
Quoted 1 line
So when guest is resetting the device, it stopped the DMA initiated by the
hypervisor.
Quoted 1 line
This fundamentally breaks things.
Why? When device resets, do you want to keep tracking dirty pages????
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
Yes, when the device resets, before that event occurred, all the pages which were dirtied, must be migrated. And after reset also new page tracking to continue.
That depends on whether there is an interrupt for the dirty pages. If there is an interrupt, then the guest owns the pages
Not in the virtio model, guest owns the memory once buffer has been used.
Yes and even better, interrupt happens after buffers marked as used.
But guest owns memory earlier and you can not change it after this point.
If you mean the guest polls the used_idx, yes that can happen, if so the guest owns the pages even earlier, and I am not sure whether we need to change anything.
Maybe we don't need to argue on this, because we MAY don't need this dirty page tracking facility. Platform PML or shadow virtqueue can work.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Zhu, LingshanQuoted 5 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PMSo, please no pass-through discussion anymore.
If you comment like this, nothing can progress.
What you are implying with above language is:
"hey a virtio can do live migration ONLY by creating vdpa device on top of ALREADY virtio device, and you get another virtio device by running through 3 layers of stack you get virtio device on other side!".
Then for sure, I disagree to it for 100% for such a single-minded design.
At least I am trying to propose if a solution can work for generic passthrough where least amount of hypervisor mediation is done.
And an extension where hypervisor has choice to more medication layers as it finds suitable. And if there are technical issues, may be two different interfaces or more admin commands needed for two modes. The idea is to attempt to converge and discuss those details, not the opposite.
Your above comment shows a clear sign of non-collaboration to make both mode works. At one point I may probably stop responding to your comments that repeatedly says:
"Go read QEMU code, Do you know what is PASID?, Do you know num_queues, Go read PCI spec"...
Taking deep breath now to do some productive work in TC...
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 7 lines · Parav Pandit
Quoted 3 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PM
So, please no pass-through discussion anymore.If you comment like this, nothing can progress.
What you are implying with above language is:
"hey a virtio can do live migration ONLY by creating vdpa device on top of ALREADY virtio device, and you get another virtio device by running through 3 layers of stack you get virtio device on other side!".
I never say that right? I keep explaining how pass-through and "trap and emulate work", I even explained how PASID work.
Quoted 10 lines
Then for sure, I disagree to it for 100% for such a single-minded design.
At least I am trying to propose if a solution can work for generic passthrough where least amount of hypervisor mediation is done.
And an extension where hypervisor has choice to more medication layers as it finds suitable. And if there are technical issues, may be two different interfaces or more admin commands needed for two modes. The idea is to attempt to converge and discuss those details, not the opposite.
Your above comment shows a clear sign of non-collaboration to make both mode works.
Well, I see you are emotional, please take a deep breath and calm down, to be professional, give yourself a break, and really not necessary to be mad at me.
As you know I am just a Junior Engineer in Intel, not like you a Senior Principle Engineer who has spent many years and have developed knowledge in this area. So I am quite technical focusing, they are all technical discussions till now.
We always welcome collaboration, remember Jason has proposed a solution to build admin vq based on these basic facilities, and I am fully agree on his proposal.
Quoted 3 lines
At one point I may probably stop responding to your comments that repeatedly says:
"Go read QEMU code, Do you know what is PASID?, Do you know
num_queues, Go read PCI spec"...
With all respect, you should do these because they are text book knowledge.
Quoted 2 lines
Taking deep breath now to do some productive work in TC...
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 6 lines · Lingshan
Quoted 3 lines · Parav Pandit
Quoted 3 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PM
So, please no pass-through discussion anymore.
Quoted 6 lines
Quoted 4 lines
If you comment like this, nothing can progress.
What you are implying with above language is:
"hey a virtio can do live migration ONLY by creating vdpa device on top of ALREADY virtio device, and you get another virtio device by running through 3 layers of stack you get virtio device on other side!".I never say that right? I keep explaining how pass-through and "trap and emulate work", I even explained how PASID work.
Parav, Lingshan can we please stop the "what is pass through" arguments?
I think thatthe term is vague, as
(almost?) no hypervisor passes all accesses without exemption through. And the fact you are speaking past enough other on this subject for how long now? seems to demonstrate I'm right.
Describing migration in the spec as opposed to leaving it up to hypervisors seems valuable at least to me since historically hypervisors did such a bad job of it. So I personally feel it's nice if it's there, and the SUSPEND bit only works after DRIVER_OK. So that's an example argument that makes sense to me. But number of layers involved in control path seems completely irrelevant to most people. *That* is an nvidia thing, something very specific about vfio and vdpa and whatnot. Nothing to do with the spec, wrong list for this.
Quoted 10 lines
Quoted 10 lines
Then for sure, I disagree to it for 100% for such a single-minded design.
At least I am trying to propose if a solution can work for generic passthrough where least amount of hypervisor mediation is done.
And an extension where hypervisor has choice to more medication layers as it finds suitable. And if there are technical issues, may be two different interfaces or more admin commands needed for two modes. The idea is to attempt to converge and discuss those details, not the opposite.
Your above comment shows a clear sign of non-collaboration to make both mode works.
Quoted 8 lines
Well, I see you are emotional, please take a deep breath and calm down, to be professional,
give yourself a break, and really not necessary to be mad at me.As you know I am just a Junior Engineer in Intel, not like you a Senior Principle Engineer who has spent many years and
have developed knowledge in this area. So I am quite technical focusing, they are all technical discussions till now.
It looks more like a passive-agressive flamewar from the side. So maybe try to see other's point of view. I asked what's the advantage of admin vq thing for migration and you said "it's an nvidia thing". And when people try to point them out to you, you go well tough. Maybe but we are wasting time here.
Quoted 3 lines
We always welcome collaboration, remember Jason has proposed a solution to build admin vq based on these basic facilities,
and I am fully agree on his proposal.
I didn't see anything specific frankly, I can easily see how Parav could get mad if he posts a reasonably fleshed out patchset (which admittedly, needs work with wording etc) and instead of review gets back "rework this on top of these basic facilities which we don't yet know how they will work but maybe will". We'll be stuck in this loop for how long?
Quoted 6 lines
Quoted 3 lines
At one point I may probably stop responding to your comments that repeatedly says:
"Go read QEMU code, Do you know what is PASID?, Do you know
num_queues, Go read PCI spec"...With all respect, you should do these because they are text book knowledge.
Quoted 2 lines
Taking deep breath now to do some productive work in TC...
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 12 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Tuesday, November 7, 2023 3:55 PMQuoted 8 lines · Lingshan
Quoted 5 lines · Parav Pandit
Quoted 3 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PM So, please no pass-through discussion anymore.If you comment like this, nothing can progress.
Quoted 9 lines
Quoted 2 lines
Quoted 2 lines
What you are implying with above language is:
"hey a virtio can do live migration ONLY by creating vdpa device on top ofALREADY virtio device, and you get another virtio device by running through 3 layers of stack you get virtio device on other side!".
Quoted 2 lines
I never say that right? I keep explaining how pass-through and "trap and emulate work", I even explained how PASID work.
Parav, Lingshan can we please stop the "what is pass through" arguments?
I am not discussing it at all anymore.
The use case is well defined and seeing how we can/cannot have one proposal.
Quoted 5 lines
I think thatthe term is vague, as
(almost?) no hypervisor passes all accesses without exemption through. And the fact you are speaking past enough other on this subject for how long now? seems to demonstrate I'm right.
In v3 I acknowledged both the use cases in commit log unlike the other side.
Quoted 3 lines
Describing migration in the spec as opposed to leaving it up to hypervisors seems valuable at least to me since historically hypervisors did such a bad job of it.
It is done in v3.
Quoted 2 lines
So I personally feel it's nice if it's there, and the SUSPEND bit only works after
DRIVER_OK. So that's an example argument that makes sense to me.
As talked suspend is useful and should be controlled by the guest anyway for power management. Hypervisor is not supposed to use it during LM.
Quoted 6 lines
But
number of layers involved in control path seems completely irrelevant to most people. *That* is an nvidia thing, something very specific about vfio and vdpa and whatnot.
Nothing to do with the spec, wrong list for this.
Certainly, it is not an Nvidia thing.
Multiple device vendors would like to do this and equally users too. So, I disagree.
I don't want to debate it.
Didn't you ask at start of this email to stop debating on what is passthrough?
Quoted 20 lines
Quoted 5 lines
Quoted 5 lines
Then for sure, I disagree to it for 100% for such a single-minded design.
At least I am trying to propose if a solution can work for generic
passthrough where least amount of hypervisor mediation is done.
Quoted 2 lines
Quoted 2 lines
And an extension where hypervisor has choice to more medication layers as
it finds suitable.
Quoted 1 line
Quoted 1 line
And if there are technical issues, may be two different interfaces or more
admin commands needed for two modes.
Quoted 1 line
Quoted 1 line
The idea is to attempt to converge and discuss those details, not the
opposite.
Quoted 2 lines
Quoted 2 lines
Your above comment shows a clear sign of non-collaboration to make both
mode works.
Quoted 4 lines
Well, I see you are emotional, please take a deep breath and calm down, to be professional, give yourself a break, and really not necessary to be mad at me.
Quoted 8 lines
Quoted 4 lines
As you know I am just a Junior Engineer in Intel, not like you a Senior Principle Engineer who has spent many years and have developed knowledge in this area. So I am quite technical focusing, they are all technical discussions till now.
It looks more like a passive-agressive flamewar from the side. So maybe try to see other's point of view. I asked what's the advantage of admin vq thing for migration and you said "it's an nvidia thing".
Huh, really you have to say this?
There are two TC sign-off on the patches.
Since I don't have the link to previously listed advantages I have to repeat here.
1. admin vq is must (it is not about an advantage) to support device passthrough to the guest.
Passthrough definition: following things are not trapped by hypervisor in one use case.
(a) virtio common and device config space
(b) cvqs for 6 and more device types
(c) hypervisor not involved in mixing PCI specific FLRs with virtio specific logic.
Quoted 2 lines
And when people try to point them out to you, you go well tough. Maybe but we are wasting time here.
Only thing Lingshan pointed out if some QoS on AQ.
He never responded on dirty page tracking, why he cannot use it. He never responded why device context cannot be used.
Quoted 11 lines
Quoted 4 lines
We always welcome collaboration, remember Jason has proposed a solution to build admin vq based on these basic facilities, and I am fully agree on his proposal.
I didn't see anything specific frankly, I can easily see how Parav could get mad if he posts a reasonably fleshed out patchset (which admittedly, needs work with wording etc) and instead of review gets back "rework this on top of these basic facilities which we don't yet know how they will work but maybe will". We'll be stuck in this loop for how long?
The series from Lingshan clearly does not address the requirements listed in v3. And he is not open to converge it either.
My humble input is:
1. Accept the two use cases listed of vfio and vdpa being practical to support existing stacks
2. Try to converge two cases; if there is common virtio spec framework it can use
3. If they can, great lets use it.
4. If not, both use cases need different infrastructure, so build two.
Do you have any better suggestions to support both use cases?
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 11 lines
From: [email protected] <[email protected] open.org> On Behalf Of Parav Pandit
Sent: Tuesday, November 7, 2023 4:43 PMMy humble input is:
1. Accept the two use cases listed of vfio and vdpa being practical to support existing stacks 2. Try to converge two cases; if there is common virtio spec framework it can use 3. If they can, great lets use it.
4. If not, both use cases need different infrastructure, so build two.Do you have any better suggestions to support both use cases?
And both use cases can be serviced by proposed admin commands with different hypervisor layers to use them. If something is missing, we can extend these admin commands further.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 9 lines · Parav Pandit
Quoted 9 lines
From: [email protected] <[email protected] open.org> On Behalf Of Parav Pandit
Sent: Tuesday, November 7, 2023 4:43 PMMy humble input is:
1. Accept the two use cases listed of vfio and vdpa being practical to support existing stacks 2. Try to converge two cases; if there is common virtio spec framework it can use 3. If they can, great lets use it.
That's my point as well.
Quoted 5 lines
Quoted 3 lines
4. If not, both use cases need different infrastructure, so build two.
Do you have any better suggestions to support both use cases?
And both use cases can be serviced by proposed admin commands with different hypervisor layers to use them.
I think it still has some open questions that need to be answered.
Quoted 2 lines
If something is missing, we can extend these admin commands further.
Thanks
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 16 lines
From: Jason Wang <[email protected]>
Sent: Wednesday, November 8, 2023 12:42 PMQuoted 9 lines · Parav Pandit
Quoted 9 lines
From: [email protected] <[email protected] open.org> On Behalf Of Parav Pandit
Sent: Tuesday, November 7, 2023 4:43 PMMy humble input is:
1. Accept the two use cases listed of vfio and vdpa being practical to support existing stacks 2. Try to converge two cases; if there is common virtio spec framework it can use 3. If they can, great lets use it.That's my point as well.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
4. If not, both use cases need different infrastructure, so build two.
Do you have any better suggestions to support both use cases?
And both use cases can be serviced by proposed admin commands with
different hypervisor layers to use them.
I think it still has some open questions that need to be answered.
Yes. I will get to it tomorrow on 11/9 or today.
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Parav PanditQuoted 1 line · Parav Pandit
Didn't you ask at start of this email to stop debating on what is passthrough?
And I'm suggesting some other terms that hopefully will describe the use-case in a generic terms as opposed to whatever is in Linus' tree as of Nov 2023.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Michael S. TsirkinQuoted 19 lines · Michael S. Tsirkin
Quoted 11 lines · Lingshan
Quoted 7 lines · Parav Pandit
Quoted 3 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PM
So, please no pass-through discussion anymore.If you comment like this, nothing can progress.
What you are implying with above language is:
"hey a virtio can do live migration ONLY by creating vdpa device on top of ALREADY virtio device, and you get another virtio device by running through 3 layers of stack you get virtio device on other side!".I never say that right? I keep explaining how pass-through and "trap and emulate work", I even explained how PASID work.
Parav, Lingshan can we please stop the "what is pass through" arguments?
I think thatthe term is vague, as
(almost?) no hypervisor passes all accesses without exemption through. And the fact you are speaking past enough other on this subject for how long now? seems to demonstrate I'm right.
Quoted 8 lines
Describing migration in the spec as opposed to leaving it up to hypervisors seems valuable at least to me since historically hypervisors did such a bad job of it. So I personally feel it's nice if it's there, and the SUSPEND bit only works after
DRIVER_OK. So that's an example argument that makes sense to me. But number of layers involved in control path seems completely irrelevant to most people. *That* is an nvidia thing, something very specific about vfio and vdpa and whatnot. Nothing to do with the spec, wrong list for this.
I agree and thanks Micheal for your help.
It's OK for me to let SUSPEND only work after DRIVER_OK.
Quoted 19 lines
Quoted 11 lines
Quoted 11 lines
Then for sure, I disagree to it for 100% for such a single-minded design.
At least I am trying to propose if a solution can work for generic passthrough where least amount of hypervisor mediation is done.
And an extension where hypervisor has choice to more medication layers as it finds suitable. And if there are technical issues, may be two different interfaces or more admin commands needed for two modes. The idea is to attempt to converge and discuss those details, not the opposite.
Your above comment shows a clear sign of non-collaboration to make both mode works.
Quoted 8 lines
Well, I see you are emotional, please take a deep breath and calm down, to be professional,
give yourself a break, and really not necessary to be mad at me.As you know I am just a Junior Engineer in Intel, not like you a Senior Principle Engineer who has spent many years and
have developed knowledge in this area. So I am quite technical focusing, they are all technical discussions till now.
Quoted 5 lines
It looks more like a passive-agressive flamewar from the side. So maybe try to see other's point of view. I asked what's the advantage of admin vq thing for migration and you said "it's an nvidia thing". And when people try to point them out to you, you go well tough. Maybe but we are wasting time here.
yeah, sorry for that, lets focus on technical opens, get things done, release better quality of work as we try our best.
Quoted 10 lines
Quoted 4 lines
We always welcome collaboration, remember Jason has proposed a solution to build admin vq based on these basic facilities,
and I am fully agree on his proposal.I didn't see anything specific frankly, I can easily see how Parav could get mad if he posts a reasonably fleshed out patchset (which admittedly, needs work with wording etc) and instead of review gets back "rework this on top of these basic facilities which we don't yet know how they will work but maybe will". We'll be stuck in this loop for how long?
OK, I did not copy-paste Jason's proposal there. Then if needed, lets try work out another approach.
Quoted 15 lines
Quoted 7 lines
Quoted 5 lines
At one point I may probably stop responding to your comments that repeatedly says:
"Go read QEMU code, Do you know what is PASID?, Do you know
num_queues, Go read PCI spec"...With all respect, you should do these because they are text book knowledge.
Quoted 1 line
Taking deep breath now to do some productive work in TC...
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.
Quoted 9 lines
Subscribe: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Zhu, LingshanQuoted 17 lines · Lingshan
Quoted 7 lines · Parav Pandit
Quoted 3 lines
From: Zhu, Lingshan <[email protected]>
Sent: Monday, November 6, 2023 3:04 PM
So, please no pass-through discussion anymore.If you comment like this, nothing can progress.
What you are implying with above language is:
"hey a virtio can do live migration ONLY by creating vdpa device on top of ALREADY virtio device, and you get another virtio device by running through 3 layers of stack you get virtio device on other side!".I never say that right? I keep explaining how pass-through and "trap and emulate work", I even explained how PASID work.
Quoted 5 lines
Then for sure, I disagree to it for 100% for such a single-minded design.
At least I am trying to propose if a solution can work for generic passthrough where least amount of hypervisor mediation is done.
Quoted 8 lines
Quoted 5 lines
And an extension where hypervisor has choice to more medication layers as it finds suitable. And if there are technical issues, may be two different interfaces or more admin commands needed for two modes. The idea is to attempt to converge and discuss those details, not the opposite.
Your above comment shows a clear sign of non-collaboration to make both mode works.
Well, I see you are emotional, please take a deep breath and calm down, to be professional,
give yourself a break, and really not necessary to be mad at me.
You aren't just going to stop people being mad by telling them not to. Try to figure out why did that happen.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Parav PanditQuoted 3 lines · Parav Pandit
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Parav what are you asking about here? pcie supports CAS and Swap which likely can work for this use-case - these are non posted writes. It's in the pcie spec. Zhu Lingshan if your proposal relies on this then you should include
- explanation on how it's supposed to be implemented using AtomicOp
- some data on how common support is or is likely to be in the field
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 5 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:00 PMOn Mon, Nov 06, 2023 at 04:34:44AM +0000, Parav Pandit wrote:
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Parav what are you asking about here?
pcie supports CAS and Swap which likely
can work for this use-case - these are non posted writes. It's in the pcie spec.
PCI spec do not have atomic OR operation.
Lingshan in above comment suggested some unknown locked transaction and atomic operation. So I was asking him which is that atomic operation and how PCI does it?
I don't know if any that can do PCI atomic OR without a workaround.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 9 lines · Parav Pandit
Quoted 9 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:00 PMQuoted 3 lines · Parav Pandit
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Quoted 8 lines
Quoted 4 lines
Parav what are you asking about here?
pcie supports CAS and Swap which likely
can work for this use-case - these are non posted writes. It's in the pcie spec.PCI spec do not have atomic OR operation.
Lingshan in above comment suggested some unknown locked transaction and atomic operation. So I was asking him which is that atomic operation and how PCI does it?
I don't know if any that can do PCI atomic OR without a workaround.
Well this is not what you wrote - you asked about RMW and that's exactly what CAS does. Maybe you should take a bit more care writing then. Generally this discussion would benefit a lot if people stop shooting from the hip.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 21 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:58 PMQuoted 6 lines · Parav Pandit
Quoted 6 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:00 PMQuoted 1 line · Parav Pandit
Quoted 1 line
Do you know there are locked transaction and atomic operations in
PCI???
Quoted 9 lines
Quoted 7 lines
Quoted 2 lines
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Parav what are you asking about here?
pcie supports CAS and Swap which likely can work for this use-case - these are non posted writes. It's in the pcie spec.
PCI spec do not have atomic OR operation.
Lingshan in above comment suggested some unknown locked transaction and
Quoted 8 lines
atomic operation.
Quoted 2 lines
So I was asking him which is that atomic operation and how PCI does it? I don't know if any that can do PCI atomic OR without a workaround.
Well this is not what you wrote - you asked about RMW and that's exactly what CAS does.
Maybe you should take a bit more care writing then. Generally this discussion would benefit a lot if people stop shooting from the hip.
Yes. I will take more care. Thanks.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Parav PanditQuoted 7 lines · Parav Pandit
Quoted 7 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:00 PMQuoted 3 lines · Parav Pandit
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Quoted 7 lines
Quoted 3 lines
Parav what are you asking about here?
pcie supports CAS and Swap which likely
can work for this use-case - these are non posted writes. It's in the pcie spec.PCI spec do not have atomic OR operation.
Lingshan in above comment suggested some unknown locked transaction and atomic operation. So I was asking him which is that atomic operation and how PCI does it?
I don't know if any that can do PCI atomic OR without a workaround.
6.15 Atomic Operations (AtomicOps)
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 10 lines · Lingshan
Quoted 7 lines · Parav Pandit
Quoted 7 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Monday, November 6, 2023 4:00 PMQuoted 3 lines · Parav Pandit
Quoted 1 line
Do you know there are locked transaction and atomic operations in PCI???
Can you explain how PCI does RMW locked transaction? Is it one TLP or multiple?
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Parav what are you asking about here?
pcie supports CAS and Swap which likely
can work for this use-case - these are non posted writes. It's in the pcie spec.PCI spec do not have atomic OR operation.
Lingshan in above comment suggested some unknown locked transaction and atomic operation. So I was asking him which is that atomic operation and how PCI does it?
I don't know if any that can do PCI atomic OR without a workaround.6.15 Atomic Operations (AtomicOps)
There's no atomic or there. I guess you could use CAS. What are you going to do if CAS fails? Error out or retry? Retry can fail indefinitely and then what does the device do? Error out might be ok - have driver slow down. You need error reporting though which you have omitted because overkill.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Parav PanditQuoted 1 line · Parav Pandit
And you never commented with sheer ignorance.
I think you mean ignoring here. ignorance is something else entirely.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] RE: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 9 lines
From: Michael S. Tsirkin <[email protected]>
Sent: Sunday, November 5, 2023 9:50 PMQuoted 1 line · Parav Pandit
And you never commented with sheer ignorance.
I think you mean ignoring here. ignorance is something else entirely.
I am sorry. You are right. I meant ignoring.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
In reply to Michael S. TsirkinQuoted 18 lines · Michael S. Tsirkin
Quoted 17 lines · Zhu Lingshan
+\item[\field{bitmap_addr}]
transport-pci.tex +16
-0+ The driver use this to set the address of the bitmap which records the dirty pages + caused by the device. + Each bit in the bitmap represents one memory page, bit 0 in the bitmap + reprsents page 0 at address 0, bit 1 represents page 1, and so on in a linear manner. + When \field{enable} is set to 1 and the device writes to a memory page, + the device MUST set the corresponding bit to 1 which indicating the page is dirty. +\item[\field{bitmap_length}] + The driver use this to set the length in bytes of the bitmap. +\end{description} + +\devicenormative{\subsubsection}{Memory Dirty Pages Tracker Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory Dirty Pages Tracker Capability} + +The device MUST NOT set any bits beyond bitmap_length when reporting dirty pages. + +To prevent a read-modify-write procedure, if a memory page is dirty, +optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1.
Quoted 8 lines
transport-pci.tex \subsubsection{Driver Handling Interrupts}\label{sec:Virtio Transport Options / · line 1287
Quoted 5 lines
transport-pci.tex +5
-0+ +The device MAY increase \field{gra_power} to reduce \field{bitmap_length}. + +The device must ignore any writes to \field{pasid} if PASID Extended Capability is absent or +the PASID functionality is disabled in PASID Extended CapabilityI have to say this is going to work very badly when the number of dirty pages is small: you will end up scanning and re-scanning all of bitmap.
The driver needs to scan anyway, Intel production work with similar bitmap based dirty page tracking solution for years.
Otherwise the device should report PFN which is not very practical.
Quoted 2 lines
And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
No, as described in the comments, the tacking granularity is controlled by \field{gra_power}, one bit represents a page with page_size = 2^(12 + gra_power). This can also be used to reduce the size of the bitmap.
"To prevent a read-modify-write procedure, if a memory page is dirty,
optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1."
This is optional and DMA is very likely to write a neighbor page, and the device transmit a whole byte anyway when a bit is dirty.
How about we use platform dirty page tracking facility then implement this in virtio, as Jason suggested?
Quoted 1 line
[virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 30 lines · Lingshan
On 11/3/2023 6:50 PM, Michael S. Tsirkin wrote:
On Fri, Nov 03, 2023 at 06:34:37PM +0800, Zhu Lingshan wrote:
+\item[\field{bitmap_addr}]
+ The driver use this to set the address of the bitmap which records the dirty pages
+ caused by the device.
+ Each bit in the bitmap represents one memory page, bit 0 in the bitmap
+ reprsents page 0 at address 0, bit 1 represents page 1, and so on in a linear manner.
+ When \field{enable} is set to 1 and the device writes to a memory page,
+ the device MUST set the corresponding bit to 1 which indicating the page is dirty.
+\item[\field{bitmap_length}]
+ The driver use this to set the length in bytes of the bitmap.
+\end{description}
+
+\devicenormative{\subsubsection}{Memory Dirty Pages Tracker Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory Dirty Pages Tracker Capability} +
+The device MUST NOT set any bits beyondbitmap_lengthwhen reporting dirty pages.
+
+To prevent a read-modify-write procedure, if a memory page is dirty,
+optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1.
+
+The device MAY increase \field{gra_power} to reduce \field{bitmap_length}.
+
+The device must ignore any writes to \field{pasid} if PASID Extended Capability is absent or
+the PASID functionality is disabled in PASID Extended Capability
Quoted 4 lines
I have to say this is going to work very badly when the number of dirty pages is small: you will end up scanning and re-scanning all of bitmap.
The driver needs to scan anyway,
Not with e.g. Parav's proposal - device reports individual pages changed. This is analogous to PML.
Quoted 2 lines
Intel production work with similar bitmap
based dirty page tracking solution for years.
and then VMs became bigger and PML was introduced.
Quoted 1 line
Otherwise the device should report PFN which is not very practical.
Why not?
Quoted 6 lines
And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
No, as described in the comments, the tacking granularity is controlled by \
field{gra_power}, one bit represents a page withpage_size= 2^(12 +gra_power). This can also be used to reduce the size of the bitmap.
.. at the cost of increasing migration bandwidth.
Quoted 8 lines
"To prevent a read-modify-write procedure, if a memory page is dirty,
optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1."This is optional and DMA is very likely to write a neighbor page, and the device transmit a whole byte anyway when a bit is dirty.
How about we use platform dirty page tracking facility then implement this in virtio, as Jason suggested?
Without something like PML it likely won't scale either.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 30 lines · Michael S. Tsirkin
Quoted 29 lines · Lingshan
On 11/3/2023 6:50 PM, Michael S. Tsirkin wrote:
On Fri, Nov 03, 2023 at 06:34:37PM +0800, Zhu Lingshan wrote:
+\item[\field{bitmap_addr}]
+ The driver use this to set the address of the bitmap which records the dirty pages
+ caused by the device.
+ Each bit in the bitmap represents one memory page, bit 0 in the bitmap
+ reprsents page 0 at address 0, bit 1 represents page 1, and so on in a linear manner.
+ When \field{enable} is set to 1 and the device writes to a memory page,
+ the device MUST set the corresponding bit to 1 which indicating the page is dirty.
+\item[\field{bitmap_length}]
+ The driver use this to set the length in bytes of the bitmap.
+\end{description}
+
+\devicenormative{\subsubsection}{Memory Dirty Pages Tracker Capability}{Virtio Transport Options / Virtio Over PCI Bus / Memory Dirty Pages Tracker Capability} +
+The device MUST NOT set any bits beyondbitmap_lengthwhen reporting dirty pages.
+
+To prevent a read-modify-write procedure, if a memory page is dirty,
+optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1.
+
+The device MAY increase \field{gra_power} to reduce \field{bitmap_length}.
+
+The device must ignore any writes to \field{pasid} if PASID Extended Capability is absent or
+the PASID functionality is disabled in PASID Extended Capability
Quoted 6 lines
Quoted 4 lines
I have to say this is going to work very badly when the number of dirty pages is small: you will end up scanning and re-scanning all of bitmap.
The driver needs to scan anyway,
Not with e.g. Parav's proposal - device reports individual pages changed. This is analogous to PML.
In this proposal, the device DMA writes the bitmap to recording dirty pages, this can easily be merged into QEMU migration flow.
Quoted 4 lines
Quoted 3 lines
Intel production work with similar bitmap
based dirty page tracking solution for years.and then VMs became bigger and PML was introduced.
So you agree we should track dirty pages through the platform facilities? I am glad to hear that!
Quoted 3 lines
Quoted 2 lines
Otherwise the device should report PFN which is not very practical.
Why not?
Really? the device report PFN?
What can happen if the device keep writing a small piece of memory???
Quoted 8 lines
Quoted 7 lines
And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
No, as described in the comments, the tacking granularity is controlled by \
field{gra_power}, one bit represents a page withpage_size= 2^(12 +gra_power). This can also be used to reduce the size of the bitmap... at the cost of increasing migration bandwidth.
The device is very likely to write a neighbor page, and this happens everywhere for example CPU read 64 bytes aligned data.
This is a tradeoff
Quoted 10 lines
Quoted 9 lines
"To prevent a read-modify-write procedure, if a memory page is dirty,
optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1."This is optional and DMA is very likely to write a neighbor page, and the device transmit a whole byte anyway when a bit is dirty.
How about we use platform dirty page tracking facility then implement this in virtio, as Jason suggested?
Without something like PML it likely won't scale either.
So that would be platform issue which we don't need to take care of? Intel VT-d can do this for sure.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 5 lines · Lingshan
Quoted 3 lines
Quoted 2 lines
Intel production work with similar bitmap
based dirty page tracking solution for years.and then VMs became bigger and PML was introduced.
So you agree we should track dirty pages through the platform facilities? I am glad to hear that!
I just said that I thought there's no PML in platform facilities and that might be a problem. Am I wrong?
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Otherwise the device should report PFN which is not very practical.
Why not?
Really? the device report PFN?
What can happen if the device keep writing a small piece of memory???
then you just report the PFN once. Should work like PML really - IOW devices maintains a bit per page internally and reports PFN when bit is set.
Quoted 9 lines
Quoted 8 lines
Quoted 7 lines
And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
No, as described in the comments, the tacking granularity is controlled by \
field{gra_power}, one bit represents a page withpage_size= 2^(12 +gra_power). This can also be used to reduce the size of the bitmap... at the cost of increasing migration bandwidth.
The device is very likely to write a neighbor page,
how likely? and e.g. with slab randomization too? please collect some data and show it.
Quoted 2 lines
and this happens
everywhere for example CPU read 64 bytes aligned data.
CPUs don't need to send their cache across a bandwidth constrained shared network.
Quoted 2 lines
This is a tradeoff
tradeoff between which two options?
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
"To prevent a read-modify-write procedure, if a memory page is dirty,
optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1."
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
This is optional and DMA is very likely to write a neighbor page, and the device transmit a whole byte anyway when a bit is dirty.
How about we use platform dirty page tracking facility then implement this in virtio, as Jason suggested?
Without something like PML it likely won't scale either.
So that would be platform issue which we don't need to take care of? Intel VT-d can do this for sure.
Intel VT-d supports PML from the IOMMU? I didn't realize. Could you help me find it in the doc please? Which hardware supports this in the field? What about other vendors?
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 8 lines · Michael S. Tsirkin
Quoted 5 lines · Lingshan
Quoted 3 lines
Quoted 2 lines
Intel production work with similar bitmap
based dirty page tracking solution for years.and then VMs became bigger and PML was introduced.
So you agree we should track dirty pages through the platform facilities? I am glad to hear that!
I just said that I thought there's no PML in platform facilities and that might be a problem. Am I wrong?
That's thru some platform may don't have PML.
The thing is most of platform have PML and this is a tradeoff:
1)don't implement dirty page tracking in virtio, but use platform. Then some platform can not track dirty pages by HW
2)implement dirty page tracking in virtio, but most platform don't use it.
As you see, I have post this virito dirty page tracking as a backup here, so this should be your call anyway.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Otherwise the device should report PFN which is not very practical.
Why not?
Really? the device report PFN?
What can happen if the device keep writing a small piece of memory???then you just report the PFN once. Should work like PML really - IOW devices maintains a bit per page internally and reports PFN when bit is set.
Yes, it is a/d bit. by bitmap, when the device keep writing a small region of memory, only needs to mark the bits as dirty once.
when reporting PFN, the device need to repeating report the same bunch of PFNs(0x1234abcd..), which is not very efficient.
And we need to merge the device dirty page into QEMU dirty page bit map anyway.
Quoted 11 lines
Quoted 9 lines
Quoted 8 lines
Quoted 7 lines
And the resolution is apparently 8 pages? You have just multiplied the migration bandwidth by a factor of 8.
No, as described in the comments, the tacking granularity is controlled by \
field{gra_power}, one bit represents a page withpage_size= 2^(12 +gra_power). This can also be used to reduce the size of the bitmap... at the cost of increasing migration bandwidth.
The device is very likely to write a neighbor page,
how likely? and e.g. with slab randomization too? please collect some data and show it.
DMA writes continuous memory and take an example of DMA writing the ring buffer, it likely to write a neighbor page. This is called memory locality.
Quoted 5 lines
Quoted 3 lines
and this happens
everywhere for example CPU read 64 bytes aligned data.CPUs don't need to send their cache across a bandwidth constrained shared network.
This is not about cacheline size, just saying it is 64bytes aligned.
Quoted 3 lines
Quoted 2 lines
This is a tradeoff
tradeoff between which two options?
1) small tracking granularity and big bitmap
2) big tracking granularity and smaller bitmap(with memory locality)
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
"To prevent a read-modify-write procedure, if a memory page is dirty,
optionally the device is permitted to set the entire byte, which encompasses the relevant bit, to 1."This is optional and DMA is very likely to write a neighbor page, and the device transmit a whole byte anyway when a bit is dirty.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
How about we use platform dirty page tracking facility then implement this in virtio, as Jason suggested?
Without something like PML it likely won't scale either.
So that would be platform issue which we don't need to take care of? Intel VT-d can do this for sure.
Intel VT-d supports PML from the IOMMU? I didn't realize. Could you help me find it in the doc please? Which hardware supports this in the field? What about other vendors?
Please refer to intel vt-d spec: https://cdrdv2-public.intel.com/774206/vt-directed-io-spec%20.pdf
As far as I know, AMD and ARM support this too.
Anyway, as said above, this should be your call whether implement dirty page tracking in virtio.
Quoted 1 line
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/
Re: [virtio-comment] Re: [PATCH V2 6/6] virtio-pci: implement dirty page tracking
Quoted 5 lines · Lingshan
Quoted 3 lines
Intel VT-d supports PML from the IOMMU? I didn't realize. Could you help me find it in the doc please? Which hardware supports this in the field? What about other vendors?
Please refer to intel vt-d spec:
https://cdrdv2-public.intel.com/774206/vt-directed-io-spec%20.pdf
Yes I know where the VTD doc is. But what chapter do you refer to when you say that VTD supports page modification log?
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 11 lines · Zhu Lingshan
This series introduces basic facilities to support virtio live migration, includes:
1)a new SUSPEND bit in the device status
Which is used to suspend the device, so that the device states and virtqueue states are stabilized.2)virtqueue state and its accessor, to get and set
last_avail_idxandlast_used_idxof virtqueues.3)dirty page tracking
So looking at this from 100ft:
- SUSPEND bit looks like something that might have value as a generic component. For example, maybe for NUMA balancing we could suspend, quickly copy ring to a different node and resume. However current restrictions make it very limited, e.g. apparently you can't change config space while suspended.
As another example, changing config while suspended might be needed e.g. for net announcements.
Also, do we want to suspend individual
queues then? what exactly happens with config changes while suspended that would happen otherwise is also unclear. Also as is, proposal is very light on detail. Other patches in the series make it look like there are more assumptions made about e.g. how vq enters the suspended state.
- virtqueue state proposal looks very vague. A couple of 16 bit indices are insufficient to fully describe internal vq state at an arbitrary time. Some assumptions seem to be made that make this possible and yes, these would need to be stated and/or lifted. Preferably lifted since another use-case proposed was debugging - you do not, while debugging, want to depend on device following a complex set of assumptions.
- dirty page tracking as described does not seem practical for
many systems. increasing page size x8 is just being nasty
towards other network users. CAS + retry could be a solution,
but this needs to be documented thoroughly then and it appears this is not what author expects to implement anyway - instead, there's an assumption that platform itself
will support dirty tracking. By itself, this is not
an impossible assumption - will possibly result in a cheaper,
slower device. why not have an option like this?
I would probably just drop it from this proposal completely.
Also, tracking memory on the device means we'll lose state
around reset. Solving that could be tricky. Finally,
dependence on PASID can not be removed apparently.
So maybe, people who want to track memory changes on the
device itself should just bite the bullet and use
admin vq in the PF.
Signature · 18 lines
MST 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: [email protected] Unsubscribe: [email protected] List help: [email protected] 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/
Quoted 11 lines · Michael S. Tsirkin
Quoted 10 lines · Zhu Lingshan
This series introduces basic facilities to support virtio live migration, includes:
1)a new SUSPEND bit in the device status
Which is used to suspend the device, so that the device states and virtqueue states are stabilized.2)virtqueue state and its accessor, to get and set
last_avail_idxandlast_used_idxof virtqueues.
Quoted 8 lines
Quoted 1 line
3)dirty page tracking
So looking at this from 100ft:
- SUSPEND bit looks like something that might have value as a generic component. For example, maybe for NUMA balancing we could suspend, quickly copy ring to a different node and resume. However current restrictions make it very limited, e.g. apparently you can't change config space while suspended.
Maybe don't need to change the source side config space. SUSPEND the device to stabilize the device config, so that the hypervisor can fetch reliable device states, then if any changes are required, just make modifications at the destination side before setting SUSPEND there.
Quoted 2 lines
As another example, changing config while suspended might be needed e.g. for net announcements.
I think link announce should happen after the device back alive, not before.
Quoted 6 lines
Also, do we want to suspend individual
queues then? what exactly happens with config changes while suspended that would happen otherwise is also unclear. Also as is, proposal is very light on detail. Other patches in the series make it look like there are more assumptions made about e.g. how vq enters the suspended state.
Not sure we need an interface to suspend a individual vq, it suspends all vqs.
I am not sure I totally get you, if you find anything I should add, and any suggestions, please let me know. I should provide more details in the cover letter for sure, I will add the live migration process in V3 cover letter.
Quoted 8 lines
- virtqueue state proposal looks very vague. A couple of 16 bit indices are insufficient to fully describe internal vq state at an arbitrary time. Some assumptions seem to be made that make this possible and yes, these would need to be stated and/or lifted. Preferably lifted since another use-case proposed was debugging - you do not, while debugging, want to depend on device following a complex set of assumptions.
I see there are two kinds of vq states:
1) on device, the device internal states.
I see they are avail idx, used idx and in-flight descriptors.
2) states in the guest memory. This part migrates with guest memory.
I may miss something, please let me what I should add in the vq states, and I can improve.
Quoted 20 lines
- dirty page tracking as described does not seem practical for
many systems. increasing page size x8 is just being nasty
towards other network users. CAS + retry could be a solution,
but this needs to be documented thoroughly then and it appears this is not what author expects to implement anyway - instead, there's an assumption that platform itself
will support dirty tracking. By itself, this is not
an impossible assumption - will possibly result in a cheaper,
slower device. why not have an option like this?
I would probably just drop it from this proposal completely.
Also, tracking memory on the device means we'll lose state
around reset. Solving that could be tricky. Finally,
dependence on PASID can not be removed apparently.
So maybe, people who want to track memory changes on the
device itself should just bite the bullet and use
admin vq in the PF.
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: [email protected]
Unsubscribe: [email protected]
List help: [email protected]
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/