Received: from eggs.gnu.org ([2001:4830:134:3::10]:41542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5LPb-0001m4-9V for qemu-devel@nongnu.org; Fri, 02 Aug 2013 15:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5LPT-0000qu-Ql for qemu-devel@nongnu.org; Fri, 02 Aug 2013 15:53:19 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:52728 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5HdP-0006OI-NK for qemu-devel@nongnu.org; Fri, 02 Aug 2013 11:51:19 -0400 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Fri, 2 Aug 2013 17:53:00 +0200 Message-Id: <1375458782-14888-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] [RFC V3 0/2] 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 works mostly on the general case. The exception is where the load is composed of both reads and writes and = two limits iops_rd and iops_wr are set. The resulting iops are a little above half of the given limits. I tried various strategies to avoid this: two timer, two throttled reques= t queues or even a different algorithm using a priority queue. The problem is still the same in every version of the code: reads and wri= tes operation seems entangled. Beno=C3=AEt Canet (2): throttle: Add a new throttling API implementing continuus leaky bucket. block: Enable the new throttling code in the block layer. block.c | 316 ++++++++------------------------ block/qapi.c | 21 +-- blockdev.c | 115 ++++++------ include/block/block.h | 1 - include/block/block_int.h | 33 +--- include/qemu/throttle.h | 111 ++++++++++++ util/Makefile.objs | 1 + util/throttle.c | 436 +++++++++++++++++++++++++++++++++++++++= ++++++ 8 files changed, 698 insertions(+), 336 deletions(-) create mode 100644 include/qemu/throttle.h create mode 100644 util/throttle.c --=20 1.7.10.4