From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgZ6M-0002jT-C9 for qemu-devel@nongnu.org; Fri, 10 Apr 2015 09:36:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgZ6F-0007go-To for qemu-devel@nongnu.org; Fri, 10 Apr 2015 09:36:06 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:34833 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgZ6F-0007gJ-Kz for qemu-devel@nongnu.org; Fri, 10 Apr 2015 09:35:59 -0400 From: Alberto Garcia Date: Fri, 10 Apr 2015 16:35:02 +0300 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v7 0/8] Block Throttle Group Support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Alberto Garcia , Stefan Hajnoczi V7: - Make block_set_io_throttle() keep a device in the same group if the parameter is omitted, and rewrite the code a bit to make it clearer and slightly more efficient. - Update the documentation of block_set_io_throttle() to explain in detail how it works. - Improve the iotest 093 to test scenarios with several devices in the same group. - Update version number to 2.4 in the 'Since:' fields. V6: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg06036.html - Use qemu_init_main_loop() in the throttling tests to make sure that all BDS have an AioContext attached. V5: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05990.html - Fixed and expanded the tests. There's a new one that checks that configuration changes affect the whole throttling group. - Refactored the code a bit: new function schedule_next_request() - any_timer_armed is now reset in throttle_group_config(), it was causing qemu-iotest 093 to fail. - Documentation improvements V4: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05558.html - All functions from the ThrottleGroup API now receive a BlockDriverState. - The creation/destruction of ThrottleTimers is now handled internally. - bdrv_io_limits_enable() no longer accepts NULL as a valid group name. - No member of a group can access someone else's throttled_reqs queues anymore. - No member of a group can access someone else's timers unless they have queued requests. - After a timer is fired make sure that there was actually a request in the queue, and schedule a new one otherwise. - Protect bdrv_swap() by locking the throttling group. - throttle_group_co_io_limits_intercept() is now marked as a coroutine function. - Documentation updates. Regards, Berto Alberto Garcia (7): throttle: Add throttle group infrastructure throttle: Add throttle group infrastructure tests throttle: Add throttle group support throttle: acquire the ThrottleGroup lock in bdrv_swap() throttle: add the name of the ThrottleGroup to BlockDeviceInfo throttle: Update throttle infrastructure copyright qemu-iotests: expand test 093 to support group throttling BenoƮt Canet (1): throttle: Extract timers from ThrottleState into a separate structure block.c | 101 ++++----- block/Makefile.objs | 1 + block/qapi.c | 8 +- block/throttle-groups.c | 489 ++++++++++++++++++++++++++++++++++++++++ blockdev.c | 38 +++- hmp.c | 10 +- include/block/block.h | 3 +- include/block/block_int.h | 7 +- include/block/throttle-groups.h | 46 ++++ include/qemu/throttle.h | 46 ++-- qapi/block-core.json | 29 ++- qemu-options.hx | 1 + qmp-commands.hx | 3 +- tests/qemu-iotests/093 | 93 +++++--- tests/test-throttle.c | 161 +++++++++---- util/throttle.c | 81 ++++--- 16 files changed, 919 insertions(+), 198 deletions(-) create mode 100644 block/throttle-groups.c create mode 100644 include/block/throttle-groups.h -- 2.1.4