From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1fRE-0004NS-MA for qemu-devel@nongnu.org; Tue, 23 Jul 2013 12:27:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1fRB-0000AS-4L for qemu-devel@nongnu.org; Tue, 23 Jul 2013 12:27:48 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:47652 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1fRA-00008o-S6 for qemu-devel@nongnu.org; Tue, 23 Jul 2013 12:27:45 -0400 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Tue, 23 Jul 2013 18:29:23 +0200 Message-Id: <1374596968-20181-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 V3 for-1.6 0/5] Leaky bucket throttling and features List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@redhat.com The first patch fixes the throttling which was broken by a previous commi= t. The next patch replace the existing throttling algorithm by the well desc= ribed leaky bucket algorithm. Third patch implement bursting by adding *_threshold parameters to qmp_block_set_io_throttle. The last one allow to define the max size of an io when throttling by iop= s via iops_sector_count to avoid vm users cheating on the iops limit. The last patch adds a metric reflecting how much the I/O are throttled. since v1: Add throttling percentage metric [Beno=C3=AEt] since v2: Enable timer only during I/O activity [Stefan] Mark function as coroutine_fn [Stefan] Guard these function checking they are in a coroutine [Stefan] Use defines to access buckets [Stefan] Fix typo [Stefan] reset throttling metric on iddle [Beno=C3=AEt] rename invalid to check_io_limit [Stefan] Beno=C3=AEt Canet (5): block: Repair the throttling code. block: Modify the throttling code to implement the leaky bucket algorithm. block: Add support for throttling burst threshold in QMP and the command line. block: Add iops_sector_count to do the iops accounting for a given io size. block: Add throttling percentage metrics. block.c | 493 ++++++++++++++++++++++++++++-----------= ------ block/qapi.c | 32 +++ blockdev.c | 174 ++++++++++++++-- hmp.c | 38 +++- include/block/block_int.h | 18 +- include/block/coroutine.h | 9 +- qapi-schema.json | 42 +++- qemu-coroutine-lock.c | 20 +- qemu-options.hx | 2 +- qmp-commands.hx | 34 +++- 10 files changed, 642 insertions(+), 220 deletions(-) --=20 1.7.10.4