Skip to content

virtio-blk: prepare for the multi-queue block layer

Stefan Hajnoczi qemu-devel 1 version Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4block/file-posix: set up Linux AIO and io_uring in the current threadblock/file-posix.c+47 -521 reply
2/4virtio-blk: add lock to protect s->rqhw/block/virtio-blk.c include/hw/virtio/virtio-blk.h+47 -231 reply
3/4virtio-blk: don't lock AioContext in the completion code pathhw/block/virtio-blk.c+4 -301 reply
4/4virtio-blk: don't lock AioContext in the submission code pathhw/block/virtio-blk.c+0 -51 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric BlakeMichael S. Tsirkin
SeriesR-b
1/4R-b
2/4R-b
3/4R-b
4/4R-b

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

Read the v1 thread

Cover letter [PATCH 0/4] virtio-blk: prepare for the multi-queue block layer

The virtio-blk device will soon be able to assign virtqueues to IOThreads, eliminating the single IOThread bottleneck. In order to do that, the I/O code path must support running in multiple threads.

This patch series removes the AioContext lock from the virtio-blk I/O code path, adds thread-safety where it is required, and ensures that Linux AIO and io_uring are available regardless of which thread calls into the block driver. With these changes virtio-blk is ready for the iothread-vq-mapping feature, which will be introduced in the next patch series.

Based-on: [email protected] ("[PATCH v3 0/4] virtio-blk: use blk_io_plug_call() instead of notification BH")
Based-on: [email protected] ("[PATCH v3 0/5] block-backend: process I/O in the current AioContext")

Stefan Hajnoczi (4):
block/file-posix: set up Linux AIO and io_uring in the current thread
virtio-blk: add lock to protect s->rq
virtio-blk: don't lock AioContext in the completion code path
virtio-blk: don't lock AioContext in the submission code path

 include/hw/virtio/virtio-blk.h |   3 +-
 block/file-posix.c             |  99 +++++++++++++++---------------
 hw/block/virtio-blk.c          | 106 +++++++++++++++------------------
 3 files changed, 98 insertions(+), 110 deletions(-)
Signature · 1 line
2.41.0