Skip to contentSkip to conversation

virtio: add VIRTIO_F_IN_ORDER to header file

PATCH In review Max Gurtovoy 2 participants 3 messages Sep 5, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio: add VIRTIO_F_IN_ORDER to header file

For now only add this definition from the spec. In the future, The drivers should negotiate this feature to optimize the performance.

---
 include/uapi/linux/virtio_config.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/uapi/linux/virtio_config.h +6 -0
index b5eda06f0d57..3fcdc4ab6f19 100644
@@ -82,6 +82,12 @@
 /* This feature indicates support for the packed virtqueue layout. */
 #define VIRTIO_F_RING_PACKED		34
 
+/*
+ * This feature indicates that all buffers are used by the device in the same
+ * order in which they have been made available.
+ */
+#define VIRTIO_F_IN_ORDER              35
+
 /*
  * This feature indicates that memory accesses by the driver and the
  * device are ordered in a way described by the platform.
Signature · 1 line
2.18.1
#1 lore raw
Quoted 4 lines · Max Gurtovoy

For now only add this definition from the spec. In the future, The drivers should negotiate this feature to optimize the performance.

So I think IN_ORDER was a mistake since it breaks ability to do pagefaults efficiently without stopping the ring. I think that VIRTIO_F_PARTIAL_ORDER is a better option - am working on finalizing that proposal, will post RSN now.

Quoted 23 lines
---
 include/uapi/linux/virtio_config.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/uapi/linux/virtio_config.h +6 -0
index b5eda06f0d57..3fcdc4ab6f19 100644
@@ -82,6 +82,12 @@
 /* This feature indicates support for the packed virtqueue layout. */
 #define VIRTIO_F_RING_PACKED		34
 
+/*
+ * This feature indicates that all buffers are used by the device in the same
+ * order in which they have been made available.
+ */
+#define VIRTIO_F_IN_ORDER              35
+
 /*
  * This feature indicates that memory accesses by the driver and the
  * device are ordered in a way described by the platform.
Signature · 1 line
2.18.1
#2 lore raw
Quoted 7 lines · Michael S. Tsirkin
Quoted 4 lines · Max Gurtovoy

For now only add this definition from the spec. In the future, The drivers should negotiate this feature to optimize the performance.

So I think IN_ORDER was a mistake since it breaks ability to do pagefaults efficiently without stopping the ring.

I'm not sure I get it.

I wanted to use it for improving performance of a virtio-blk device by coalescing many completions to one interrupt.

Quoted 27 lines

I think that VIRTIO_F_PARTIAL_ORDER is a better option - am working on finalizing that proposal, will post RSN now.

Quoted 23 lines
---
  include/uapi/linux/virtio_config.h | 6 ++++++
  1 file changed, 6 insertions(+)
include/uapi/linux/virtio_config.h +6 -0
index b5eda06f0d57..3fcdc4ab6f19 100644
@@ -82,6 +82,12 @@
  /* This feature indicates support for the packed virtqueue layout. */
  #define VIRTIO_F_RING_PACKED		34
 
+/*
+ * This feature indicates that all buffers are used by the device in the same
+ * order in which they have been made available.
+ */
+#define VIRTIO_F_IN_ORDER              35
+
  /*
   * This feature indicates that memory accesses by the driver and the
   * device are ordered in a way described by the platform.
Signature · 1 line
2.18.1