Skip to content

throttle: use AioContext for dataplane support

Stefan Hajnoczi qemu-devel 1 version Applied

Status from this message: Applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3throttle: add throttle_detach/attach_aio_context()block.c include/qemu/throttle.h tests/test-throttle.c +1 more+60 -93 replies
2/3throttle: add detach/attach test casetests/test-throttle.c+24 -01 reply
3/3blockdev: acquire AioContext in block_set_io_throttleblockdev.c+6 -01 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchBenoit Canet
1/3R-b
2/3R-b
3/3R-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 [Qemu-devel] [PATCH 0/3] throttle: use AioContext for dataplane support

This series applies on top of my "dataplane: use QEMU block layer" series.

Now that the dataplane code path is using the QEMU block layer we should make I/O throttling limits safe to use. When the block_set_io_throttle monitor command is executed, the BlockDriverState's AioContext must be acquired in order to prevent race conditions with the IOThread that is processing requests from the guest.

The new block layer AioContext detach/attach mechanism needs to be extended to move the throttling timer to a new AioContext. This makes throttling work across bdrv_set_aio_context() calls.

The result of this series is that I/O throttling works with dataplane and limits may be changed at runtime using the monitor.

Stefan Hajnoczi (3):
throttle: add throttle_detach/attach_aio_context()
throttle: add detach/attach test case
blockdev: acquire AioContext in block_set_io_throttle

 block.c                 |  7 +++++++
 blockdev.c              |  6 ++++++
 include/qemu/throttle.h | 10 ++++++++++
 tests/test-throttle.c   | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
 util/throttle.c         | 27 +++++++++++++++++++++++----
 5 files changed, 90 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.0