[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support
From: |
Alberto Garcia |
Subject: |
[Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support |
Date: |
Tue, 10 Mar 2015 17:30:44 +0200 |
Hello,
here's the new version of the block throttling patches. After the
discussions from the previous thread, this one is significantly
rewritten from the original code.
The main change is in the group throttling API, which is -I believe-
much simpler now. The code in block.c and throttle.c also needs far
fewer changes.
Here's what's new:
- The following calls are no longer part of the API, and are now
handled internally:
throttle_group_incref()
throttle_group_unref()
throttle_group_set_token()
throttle_group_token()
throttle_group_lock()
throttle_group_unlock()
- New throttle_group_config() and throttle_group_get_config() calls,
that can be called concurrently by the members of the same group.
- bdrv_throttle_group_add/remove() have been merged into
throttle_group_register/unregister_bs() and moved to
throttle-groups.c.
The result of this is that in the sequence throttle_group_incref() +
bdrv_throttle_group_add() + throttle_group_register_bs() only this
last calls remains and takes care of everything else.
- The algorithm in bdrv_io_limits_intercept() and friends has been
simplified and moved to throttle-groups.c.
- The any_timer_armed array no longer exists. The group throttling
code checks the timers directly to see if any of them is pending.
- The tests have been adapted to the new API.
- The code is hopefully better documented now.
There's still the question of what to do with the QMP API to get all
throttling groups, but since there is no consensus yet I haven't
included it in this series.
And I think that's all.
As usual, comments and feedback are welcome.
Berto
Alberto Garcia (5):
throttle: Add throttle group infrastructure
throttle: Add throttle group infrastructure tests
throttle: Add throttle group support
throttle: add the name of the ThrottleGroup to BlockDeviceInfo
throttle: Update throttle infrastructure copyright
BenoƮt Canet (1):
throttle: Extract timers from ThrottleState into a separate structure
block.c | 82 ++++-----
block/Makefile.objs | 1 +
block/qapi.c | 8 +-
block/throttle-groups.c | 371 ++++++++++++++++++++++++++++++++++++++++
blockdev.c | 19 +-
hmp.c | 10 +-
include/block/block.h | 3 +-
include/block/block_int.h | 9 +-
include/block/throttle-groups.h | 45 +++++
include/qemu/throttle.h | 46 +++--
qapi/block-core.json | 8 +-
qemu-options.hx | 1 +
qmp-commands.hx | 3 +-
tests/test-throttle.c | 119 +++++++++----
util/throttle.c | 81 +++++----
15 files changed, 665 insertions(+), 141 deletions(-)
create mode 100644 block/throttle-groups.c
create mode 100644 include/block/throttle-groups.h
--
2.1.4
- [Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support,
Alberto Garcia <=
[Qemu-devel] [PATCH 3/6] throttle: Add throttle group infrastructure tests, Alberto Garcia, 2015/03/10
[Qemu-devel] [PATCH 5/6] throttle: add the name of the ThrottleGroup to BlockDeviceInfo, Alberto Garcia, 2015/03/10
[Qemu-devel] [PATCH 1/6] throttle: Extract timers from ThrottleState into a separate structure, Alberto Garcia, 2015/03/10