From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7RCJ-0001Pc-6q for qemu-devel@nongnu.org; Thu, 08 Aug 2013 10:28:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7RCD-0003W9-6N for qemu-devel@nongnu.org; Thu, 08 Aug 2013 10:28:15 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:54871 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7RCC-0003U7-Rj for qemu-devel@nongnu.org; Thu, 08 Aug 2013 10:28:09 -0400 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Thu, 8 Aug 2013 16:29:48 +0200 Message-Id: <1375972194-3090-1-git-send-email-benoit@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH V4 0/5] Continuous Leaky Bucket Throttling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@redhat.com This patchset implement continous leaky bucket throttling. It use two requests queue to enable to do silly unbalanced throttling lik= e block_set_io_throttle 0 0 0 0 6000 1 It use two timer to get the timer callbacks and the throttle.c code simpl= e It add unit tests. It fail with the following error message at exit and I don't know why yet= . qemu-system-x86_64: block.c:1489: bdrv_drain_all: Assertion `((&bs->tracked_requests)->lh_first =3D=3D ((void *)0))' failed. The throttling core is pretty solid and the surrouding of the patchset ne= eds polish. (new options ...) since previous version: wrap qemu-option.hx declararation [Eric] continuus -> continuous [Fam] unit test [Paolo] Beno=C3=AEt Canet (5): throttle: Add a new throttling API implementing continuous leaky bucket. throttle: Add units tests block: Enable the new throttling code in the block layer. block: Add support for throttling burst max in QMP and the command line. block: Add iops_sector_count to do the iops accounting for a given io size. block.c | 351 ++++++++++---------------------- block/qapi.c | 50 +++-- blockdev.c | 207 ++++++++++++++----- hmp.c | 36 +++- include/block/block.h | 1 - include/block/block_int.h | 32 +-- include/qemu/throttle.h | 105 ++++++++++ qapi-schema.json | 40 +++- qemu-options.hx | 4 +- qmp-commands.hx | 34 +++- tests/Makefile | 2 + tests/test-throttle.c | 494 +++++++++++++++++++++++++++++++++++++++= ++++++ util/Makefile.objs | 1 + util/throttle.c | 391 +++++++++++++++++++++++++++++++++++ 14 files changed, 1405 insertions(+), 343 deletions(-) create mode 100644 include/qemu/throttle.h create mode 100644 tests/test-throttle.c create mode 100644 util/throttle.c --=20 1.7.10.4