virtio: Clarify MR transaction optimization
commit9cf4fd872d14ae109ce1ee430bf67499c2682fa5
authorGreg Kurz <groug@kaod.org>
Mon, 17 May 2021 13:26:37 +0000 (17 15:26 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 2 Jul 2021 15:13:39 +0000 (2 11:13 -0400)
tree5ed8f586d9d3bf606211a0fe5ccbcb48033d6710
parent3909c079454a49b113c60a5cd91d749f78ca1c7f
virtio: Clarify MR transaction optimization

The device model batching its ioeventfds in a single MR transaction is
an optimization. Clarify this in virtio-scsi, virtio-blk and generic
virtio code. Also clarify that the transaction must commit before
closing ioeventfds so that no one is tempted to merge the loops
in the start functions error path and in the stop functions.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <162125799728.1394228.339855768563326832.stgit@bahia.lan>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/block/dataplane/virtio-blk.c
hw/scsi/virtio-scsi-dataplane.c
hw/virtio/virtio.c