From: Alberto Garcia <berto@igalia.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Alberto Garcia <berto@igalia.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support
Date: Tue, 10 Mar 2015 17:30:44 +0200 [thread overview]
Message-ID: <cover.1426000801.git.berto@igalia.com> (raw)
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
next reply other threads:[~2015-03-10 15:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 15:30 Alberto Garcia [this message]
2015-03-10 15:30 ` [Qemu-devel] [PATCH 1/6] throttle: Extract timers from ThrottleState into a separate structure Alberto Garcia
2015-03-24 15:03 ` Stefan Hajnoczi
2015-03-10 15:30 ` [Qemu-devel] [PATCH 2/6] throttle: Add throttle group infrastructure Alberto Garcia
2015-03-24 15:03 ` Stefan Hajnoczi
2015-03-24 15:33 ` Alberto Garcia
2015-03-25 12:01 ` Stefan Hajnoczi
2015-03-25 12:14 ` Alberto Garcia
2015-03-10 15:30 ` [Qemu-devel] [PATCH 3/6] throttle: Add throttle group infrastructure tests Alberto Garcia
2015-03-24 15:15 ` Stefan Hajnoczi
2015-03-10 15:30 ` [Qemu-devel] [PATCH 4/6] throttle: Add throttle group support Alberto Garcia
2015-03-24 16:03 ` Stefan Hajnoczi
2015-03-24 16:31 ` Stefan Hajnoczi
2015-03-24 17:48 ` Alberto Garcia
2015-03-25 12:03 ` Stefan Hajnoczi
2015-03-10 15:30 ` [Qemu-devel] [PATCH 5/6] throttle: add the name of the ThrottleGroup to BlockDeviceInfo Alberto Garcia
2015-03-10 15:30 ` [Qemu-devel] [PATCH 6/6] throttle: Update throttle infrastructure copyright Alberto Garcia
2015-03-24 16:32 ` [Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1426000801.git.berto@igalia.com \
--to=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).