Skip to content

block: Move I/O throttling to BlockBackend

Kevin Wolf qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 4 repliesIn review
  2. v213 patches 25 repliesSuperseded
  3. v112 patches 14 repliesSuperseded

Changes in v3 from the cover letter

- Patch 5: 'block: Move throttling fields from BDS to BB' Fixed a few commentions still mentioning BDS instead of BB [Berto]

- Patch 9: 'block: Drain throttling queue with BdrvChild' Documented the semantics of BdrvChildRole.drained_begin/end [Stefan]

- Patch 10 (new): 'block/io: Quiesce parents between drained_begin/end' Fix that parent requests were allowed again too early [Stefan]

- Patch 14 (was 13): 'block: Don't check throttled reqs in bdrv_requests_pending()' Explained more cases in the commit message [Berto]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14block: Make sure throttled BDSes always have a BBblock.c block/block-backend.c blockdev.c +1 more+27 -50 replies
2/14block: Introduce BlockBackendPublicblock/block-backend.c include/sysemu/block-backend.h+27 -00 replies
3/14block: throttle-groups: Use BlockBackend pointers internallyblock/io.c block/throttle-groups.c include/block/block_int.h +3 more+83 -780 replies
4/14block: Convert throttle_group_get_name() to BlockBackendblock/block-backend.c block/io.c block/qapi.c +3 more+12 -120 replies
5/14block: Move throttling fields from BDS to BBblock.c block/block-backend.c block/io.c +7 more+142 -1180 replies
6/14block: Move actual I/O throttling to BlockBackendblock/block-backend.c block/io.c block/throttle-groups.c +1 more+13 -140 replies
7/14block: Move I/O throttling configuration functions to BlockBackendblock.c block/block-backend.c block/io.c +8 more+71 -770 replies
8/14block: Introduce BdrvChild.opaqueblock/block-backend.c include/block/block_int.h+3 -00 replies
9/14block: Drain throttling queue with BdrvChild callbackblock/block-backend.c block/io.c include/block/block_int.h+56 -311 reply
10/14block/io: Quiesce parents between drained_begin/endblock/io.c+3 -01 reply
11/14block: Decouple throttling from BlockDriverStateblock.c block/block-backend.c blockdev.c +1 more+23 -780 replies
12/14block: Remove bdrv_move_feature_fields()block.c+0 -300 replies
13/14Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6"block.c blockdev.c+0 -130 replies
14/14block: Don't check throttled reqs in bdrv_requests_pending()block/io.c+0 -70 replies

Reviews trailers per patch

11 of 14 patches have a Reviewed-by or Acked-by.

PatchEric BlakeAlberto GarciaMax Reitz
1/14R-b R-b
2/14R-b R-b
3/14R-b
4/14R-b
5/14
6/14R-b
7/14R-b
8/14R-b
9/14R-b
10/14
11/14R-b
12/14R-b R-b
13/14R-b
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/14] block: Move I/O throttling to BlockBackend

This is another feature that was "logically" part of the BlockBackend, but implemented as a BlockDriverState feature. It was always kept on top using swap_feature_fields().

This series moves it to be actually implemented in the BlockBackend, removing another obstacle for removing bs->blk and allowing multiple BBs per BDS.

Applies to block-next.

v3:
- Patch 5: 'block: Move throttling fields from BDS to BB' Fixed a few commentions still mentioning BDS instead of BB [Berto]

- Patch 9: 'block: Drain throttling queue with BdrvChild' Documented the semantics of BdrvChildRole.drained_begin/end [Stefan]

- Patch 10 (new): 'block/io: Quiesce parents between drained_begin/end' Fix that parent requests were allowed again too early [Stefan]

- Patch 14 (was 13): 'block: Don't check throttled reqs in bdrv_requests_pending()' Explained more cases in the commit message [Berto]

v2:
- Rebased on top of Paolo's 'bdrv_flush_io_queue removal, shared LinuxAioState' Most notable this includes a complete rewrite of patch 9 (was 10): 'block:
Drain throttling queue with BdrvChild'. Instead of a single drain_queue() callback we now have a drained_begin/end() pair.

- Patch 2 (was 3): 'block: Introduce BlockBackendPublic' Add int dummy to yet empty struct BlockBackendPublic [Eric]

- Patch 11: 'block: Remove bdrv_move_feature_fields()' After the rebase, the function ended up empty, we can remove it now

- Patch 12: 'Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6"'
This was committed to master after v1 had been posted, so this one is new as well. The reason for forbidding this was that patch 6 ('block: Move actual I/O throttling to BlockBackend') would change the behaviour of the non-BB parents. Now that the final behaviour is implemented, we can allow the setup.

Kevin Wolf (14):
block: Make sure throttled BDSes always have a BB
block: Introduce BlockBackendPublic
block: throttle-groups: Use BlockBackend pointers internally
block: Convert throttle_group_get_name() to BlockBackend
block: Move throttling fields from BDS to BB
block: Move actual I/O throttling to BlockBackend
block: Move I/O throttling configuration functions to BlockBackend
block: Introduce BdrvChild.opaque
block: Drain throttling queue with BdrvChild callback block/io: Quiesce parents between drained_begin/end
block: Decouple throttling from BlockDriverState
block: Remove bdrv_move_feature_fields()
Revert "block: Forbid I/O throttling on nodes with multiple parents

    for 2.6"

block: Don't check throttled reqs in bdrv_requests_pending()

 block.c                         |  58 +---------
 block/block-backend.c           | 135 ++++++++++++++++++----
 block/io.c                      |  86 ++++----------
 block/qapi.c                    |   6 +-
 block/throttle-groups.c         | 244 +++++++++++++++++++++-------------------
 blockdev.c                      |  50 +++-----
 include/block/block.h           |   4 -
 include/block/block_int.h       |  35 ++----
 include/block/throttle-groups.h |  14 +--
 include/sysemu/block-backend.h  |  27 +++++
 tests/test-throttle.c           |  62 +++++-----
 11 files changed, 359 insertions(+), 362 deletions(-)
Signature · 1 line
1.8.3.1