qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support
@ 2015-03-10 15:30 Alberto Garcia
  2015-03-10 15:30 ` [Qemu-devel] [PATCH 1/6] throttle: Extract timers from ThrottleState into a separate structure Alberto Garcia
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Alberto Garcia @ 2015-03-10 15:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Alberto Garcia, Stefan Hajnoczi

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-03-25 12:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-10 15:30 [Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support Alberto Garcia
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

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).