Skip to content

Block Throttle Group Support

Alberto Garcia qemu-devel 8 versions – Applied

Status from this message: Thanks, applied to my block tree:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest8 patches 1 replyApplied
  2. v88 patches 9 repliesApplied
  3. v78 patches 0 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v67 patches14 repliesSuperseded
v57 patches0 repliesSuperseded
v47 patches5 repliesSuperseded
v36 patches11 repliesSuperseded
v29 patches24 repliesSuperseded

Changes in v9 from the cover letter

- Make test-throttle.c call bdrv_init() to make sure that throttle_groups_init() gets called and the mutex is initialized. This was breaking the tests in Mac OS X.

Patches in v9 Applied

#Subject and filesSizeRepliesApplied
1/8throttle: Extract timers from ThrottleState into a separate structureblock.c block/io.c include/block/block_int.h +3 more+135 -940 replies
2/8throttle: Add throttle group infrastructureblock/Makefile.objs block/throttle-groups.c include/block/block_int.h +1 more+302 -00 replies
3/8throttle: Add throttle group infrastructure teststests/test-throttle.c+71 -100 replies
4/8throttle: Add throttle group supportblock.c block/io.c block/qapi.c +9 more+309 -850 replies
5/8throttle: acquire the ThrottleGroup lock in bdrv_swap()block.c block/throttle-groups.c include/block/throttle-groups.h+49 -10 replies
6/8throttle: add the name of the ThrottleGroup to BlockDeviceInfoblock/qapi.c hmp.c qapi/block-core.json+10 -30 replies
7/8throttle: Update throttle infrastructure copyrightinclude/qemu/throttle.h util/throttle.c+10 -60 replies
8/8qemu-iotests: expand test 093 to support group throttlingtests/qemu-iotests/093+63 -260 replies

Reviews trailers per patch

7 of 8 patches have a Reviewed-by or Acked-by.

PatchStefan Hajnoczi
1/8R-b
2/8R-b
3/8
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

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

Read the v9 thread

Cover letter [Qemu-devel] [PATCH v9 0/8] Block Throttle Group Support

V9:
- Make test-throttle.c call bdrv_init() to make sure that throttle_groups_init() gets called and the mutex is initialized. This was breaking the tests in Mac OS X.

V8: https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg03716.html
- Rebased against the current master.

V7: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg01196.html
- Make block_set_io_throttle() keep a device in the same group if the parameter is omitted, and rewrite the code a bit to make it clearer and slightly more efficient.

- Update the documentation of block_set_io_throttle() to explain in detail how it works.

- Improve the iotest 093 to test scenarios with several devices in the same group.

- Update version number to 2.4 in the 'Since:' fields.

V6: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg06036.html
- Use qemu_init_main_loop() in the throttling tests to make sure that all BDS have an AioContext attached.

V5: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05990.html
- Fixed and expanded the tests. There's a new one that checks that configuration changes affect the whole throttling group.

- Refactored the code a bit: new function schedule_next_request()

- any_timer_armed is now reset in throttle_group_config(), it was causing qemu-iotest 093 to fail.

- Documentation improvements

V4: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05558.html
- All functions from the ThrottleGroup API now receive a BlockDriverState.

- The creation/destruction of ThrottleTimers is now handled internally.

- bdrv_io_limits_enable() no longer accepts NULL as a valid group name.

- No member of a group can access someone else's throttled_reqs queues anymore.

- No member of a group can access someone else's timers unless they have queued requests.

- After a timer is fired make sure that there was actually a request in the queue, and schedule a new one otherwise.

- Protect bdrv_swap() by locking the throttling group.

- throttle_group_co_io_limits_intercept() is now marked as a coroutine function.

- Documentation updates.

Regards,

Berto

Alberto Garcia (7):
throttle: Add throttle group infrastructure
throttle: Add throttle group infrastructure tests
throttle: Add throttle group support
throttle: acquire the ThrottleGroup lock in bdrv_swap()
throttle: add the name of the ThrottleGroup to BlockDeviceInfo
throttle: Update throttle infrastructure copyright
qemu-iotests: expand test 093 to support group throttling

Benoît Canet (1):
throttle: Extract timers from ThrottleState into a separate structure

 block.c                         |  38 ++-
 block/Makefile.objs             |   1 +
 block/io.c                      |  71 ++----
 block/qapi.c                    |   8 +-
 block/throttle-groups.c         | 496 ++++++++++++++++++++++++++++++++++++++++
 blockdev.c                      |  38 ++-
 hmp.c                           |  10 +-
 include/block/block.h           |   3 +-
 include/block/block_int.h       |   7 +-
 include/block/throttle-groups.h |  46 ++++
 include/qemu/throttle.h         |  46 ++--
 qapi/block-core.json            |  29 ++-
 qemu-options.hx                 |   1 +
 qmp-commands.hx                 |   3 +-
 tests/qemu-iotests/093          |  89 ++++---
 tests/test-throttle.c           | 163 +++++++++----
 util/throttle.c                 |  81 ++++---
 17 files changed, 927 insertions(+), 203 deletions(-)
 create mode 100644 block/throttle-groups.c
 create mode 100644 include/block/throttle-groups.h
Signature · 1 line
2.1.4