Skip to content

RFC virtio-blk: add multiread support

Peter Lieven qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest4 patches 5 repliesIn review
  2. v1 RFC3 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- completed Patch 1 by the example in qmp-commands.hx [Eric]
- used bool for merge in Patch 4 [Max]
- fixed a few typos in the commit msg of Patch 4 [Max]
- do not start merging and directly pass req[0]->qiov in case of num_reqs == 1
- avoid allocating memory for the multireq [Kevin]
- do not import block_int.h and add appropiate iface to block-backend [Kevin]
- removed debug output and added trace event for multireq [Kevin]
- fixed alloc hint for the merge qiov [Kevin]
- currently did not split virtio_submit_multireq into rw code since the redundant code would now be much bigger part than in the original patch.
- added a merge_qiov to VirtioBlockRequest. Abusing the qiov was not possible because it is initialized externally with guest memory [Kevin]
- added a pointer to VirtioBlockRequest to create a linked list of VirtioBlockBlockRequests. This list is used to complete all requests belonging to a multireq [Kevin]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4block: add accounting for merged requestsblock.c block/accounting.c block/qapi.c +4 more+45 -62 replies
2/4hw/virtio-blk: add a constant for max number of merged requestshw/block/virtio-blk.c include/hw/virtio/virtio-blk.h+4 -21 reply
3/4block-backend: expose bs->bl.max_transfer_lengthblock/block-backend.c include/sysemu/block-backend.h+6 -00 replies
4/4virtio-blk: introduce multireadhw/block/dataplane/virtio-blk.c hw/block/virtio-blk.c include/hw/virtio/virtio-blk.h +1 more+146 -1092 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/4R-b
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [RFC PATCH V2 0/4] virtio-blk: add multiread support

this series adds the long missing multiread support to virtio-blk.

some remarks:
- i introduced rd_merged and wr_merged block accounting stats to blockstats as a generic interface which can be set from any driver that will introduce multirequst merging in the future.
- the knob to disable request merging is not yet there. I would add it to the device properties also as a generic interface to have the same switch on for any driver that might introduce request merging in the future
- there is cleanup and iotest adjustion missing.

RFC v1->v2:
- completed Patch 1 by the example in qmp-commands.hx [Eric]
- used bool for merge in Patch 4 [Max]
- fixed a few typos in the commit msg of Patch 4 [Max]
- do not start merging and directly pass req[0]->qiov in case of num_reqs == 1
- avoid allocating memory for the multireq [Kevin]
- do not import block_int.h and add appropiate iface to block-backend [Kevin]
- removed debug output and added trace event for multireq [Kevin]
- fixed alloc hint for the merge qiov [Kevin]
- currently did not split virtio_submit_multireq into rw code since the redundant code would now be much bigger part than in the original patch.
- added a merge_qiov to VirtioBlockRequest. Abusing the qiov was not possible because it is initialized externally with guest memory [Kevin]
- added a pointer to VirtioBlockRequest to create a linked list of VirtioBlockBlockRequests. This list is used to complete all requests belonging to a multireq [Kevin]

Peter Lieven (4):
block: add accounting for merged requests hw/virtio-blk: add a constant for max number of merged requests
block-backend: expose bs->bl.max_transfer_length
virtio-blk: introduce multiread

 block.c                         |    2 +
 block/accounting.c              |    7 ++
 block/block-backend.c           |    5 +
 block/qapi.c                    |    2 +
 hmp.c                           |    6 +-
 hw/block/dataplane/virtio-blk.c |   10 +-
 hw/block/virtio-blk.c           |  219 ++++++++++++++++++++++-----------------
 include/block/accounting.h      |    3 +
 include/hw/virtio/virtio-blk.h  |   23 ++--
 include/sysemu/block-backend.h  |    1 +
 qapi/block-core.json            |    9 +-
 qmp-commands.hx                 |   22 +++-
 trace-events                    |    1 +
 13 files changed, 197 insertions(+), 113 deletions(-)
Signature · 1 line
1.7.9.5