From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbUnM-0004CN-DV for qemu-devel@nongnu.org; Tue, 07 Oct 2014 09:27:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbUnG-0007iL-4L for qemu-devel@nongnu.org; Tue, 07 Oct 2014 09:27:16 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:60866 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbUnF-0007hc-Ts for qemu-devel@nongnu.org; Tue, 07 Oct 2014 09:27:10 -0400 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Tue, 7 Oct 2014 15:24:31 +0200 Message-Id: <1412688279-8312-1-git-send-email-benoit.canet@nodalink.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v1 0/8] Block Throttle Group Support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@redhat.com Hi, For the user interface I implemented Stefanha's idea proposed in Stuttgar= t. For the throttling algorithm I use a cooperative round robin scheduler. Classical round robin works with a fixed HZ ticks and it's totaly incompa= tible with the throttling algorithm. So the cooperative round robin scheduler is a way for each block device t= o decide if a pause must be done and a timer be armed and most important of all wh= ich other block device of the group must resume the work once the timer is fi= red. The advantages of this algorigthm are: -only one timer active at a given time (no more cpu usage than regular th= rottling) -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 schedul= ing then with and dispatchs queues -Compatible with the throttling code with almost no changes -As you go scheduling Best regards Beno=C3=AEt Beno=C3=AEt 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 --=20 2.1.1