qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 0/5] Throttle group cooperative round robin scheduling
@ 2014-08-12 13:42 Benoît Canet
  2014-08-12 13:42 ` [Qemu-devel] [RFC 1/5] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure Benoît Canet
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Benoît Canet @ 2014-08-12 13:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, Benoît Canet, stefanha

Hi,

Here is my current wip on the throttle group support.

For the user interface I implemented Stefanha's idea proposed in Stuttgart.

For the throttling algorithm I use a cooperative round robin scheduler.

Classical round robin works with a fixed HZ ticks and it's totaly incompatible
with the throttling algorithm.

So the cooperative round robin scheduler is a way for each block device to decide
if a pause must be done and a timer be armed and most important of all which
other block device of the group must resume the work once the timer is fired.

The advantages of this algorigthm are:

-only one timer active at a given time (no more cpu usage than regular throttling)
-no central place didacting the sheduling policy like a didactureship:
 we love collaboration isn't it ?:)
-No need to deal with  incoming queues to collect requests before scheduling 
 then with and dispatchs queues
-Compatible with the throttling code with almost no changes
-As you go scheduling

Best regards

Benoît

Benoît Canet (5):
  throttle: Extract timers from ThrottleState into a separate
    ThrottleTimers structure
  throttle: Add throttle group infrastructure.
  throttle: Add throttle group infrastructure tests
  throttle: Prepare to have multiple timers for one ThrottleState
  throttle: Add throttle group support.

 block.c                        | 173 +++++++++++++++++++++++++++++++-----
 block/qapi.c                   |   2 +-
 blockdev.c                     |  16 +++-
 hmp.c                          |   4 +-
 include/block/block.h          |   2 +-
 include/block/block_int.h      |   9 +-
 include/qemu/throttle-groups.h |  43 +++++++++
 include/qemu/throttle.h        |  42 ++++++---
 qapi/block-core.json           |   5 +-
 qemu-options.hx                |   1 +
 qmp-commands.hx                |   3 +-
 tests/test-throttle.c          | 133 ++++++++++++++++++++--------
 util/Makefile.objs             |   1 +
 util/throttle-groups.c         | 195 +++++++++++++++++++++++++++++++++++++++++
 util/throttle.c                | 103 +++++++++++++++-------
 15 files changed, 616 insertions(+), 116 deletions(-)
 create mode 100644 include/qemu/throttle-groups.h
 create mode 100644 util/throttle-groups.c

-- 
2.1.0.rc1

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

end of thread, other threads:[~2014-08-12 13:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12 13:42 [Qemu-devel] [RFC 0/5] Throttle group cooperative round robin scheduling Benoît Canet
2014-08-12 13:42 ` [Qemu-devel] [RFC 1/5] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure Benoît Canet
2014-08-12 13:42 ` [Qemu-devel] [RFC 2/5] throttle: Add throttle group infrastructure Benoît Canet
2014-08-12 13:42 ` [Qemu-devel] [RFC 3/5] throttle: Add throttle group infrastructure tests Benoît Canet
2014-08-12 13:42 ` [Qemu-devel] [RFC 4/5] throttle: Prepare to have multiple timers for one ThrottleState Benoît Canet
2014-08-12 13:42 ` [Qemu-devel] [RFC 5/5] throttle: Add throttle group support Benoît Canet

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