All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 0/8] Block Throttle Group Support
@ 2014-10-07 13:24 Benoît Canet
  2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 1/8] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure Benoît Canet
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Benoît Canet @ 2014-10-07 13:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, famz, Benoît Canet, stefanha

Hi,

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 (8):
  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 a way to know if throttle_schedule_timer had armed a
    timer
  throttle: Add a way to fire one of the timers asap like a bottom half
  throttle: Add throttle group support
  throttle: Update throttle infrastructure copyright

 block.c                         | 211 ++++++++++++++++++++++++++++++++++-----
 block/Makefile.objs             |   1 +
 block/qapi.c                    |   7 +-
 block/throttle-groups.c         | 212 ++++++++++++++++++++++++++++++++++++++++
 blockdev.c                      |  19 +++-
 hmp.c                           |   4 +-
 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            |   5 +-
 qemu-options.hx                 |   1 +
 qmp-commands.hx                 |   3 +-
 tests/test-throttle.c           | 137 +++++++++++++++++++-------
 util/throttle.c                 | 107 +++++++++++++-------
 15 files changed, 685 insertions(+), 125 deletions(-)
 create mode 100644 block/throttle-groups.c
 create mode 100644 include/block/throttle-groups.h

-- 
2.1.1

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

end of thread, other threads:[~2014-10-10 11:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 13:24 [Qemu-devel] [PATCH v1 0/8] Block Throttle Group Support Benoît Canet
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 1/8] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure Benoît Canet
2014-10-08  5:51   ` Fam Zheng
2014-10-08 15:06   ` Eric Blake
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 2/8] throttle: Add throttle group infrastructure Benoît Canet
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 3/8] throttle: Add throttle group infrastructure tests Benoît Canet
2014-10-08  6:20   ` Fam Zheng
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 4/8] throttle: Prepare to have multiple timers for one ThrottleState Benoît Canet
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 5/8] throttle: Add a way to know if throttle_schedule_timer had armed a timer Benoît Canet
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 6/8] throttle: Add a way to fire one of the timers asap like a bottom half Benoît Canet
2014-10-08  6:26   ` Fam Zheng
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support Benoît Canet
2014-10-08  6:53   ` Fam Zheng
2014-10-08 11:05     ` Benoît Canet
2014-10-09  8:58       ` Fam Zheng
2014-10-10 11:35         ` Benoît Canet
2014-10-07 13:24 ` [Qemu-devel] [PATCH v1 8/8] throttle: Update throttle infrastructure copyright Benoît Canet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.