From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8II-0000xt-1z for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:39:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj8IF-0001W2-RF for qemu-devel@nongnu.org; Thu, 24 Mar 2016 12:39:33 -0400 Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 24 Mar 2016 17:39:20 +0100 Message-Id: <1458837566-108527-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1458837566-108527-1-git-send-email-pbonzini@redhat.com> References: <1458837566-108527-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/7] block: Don't disable I/O throttling on sync requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com, qemu-block@nongnu.org From: Kevin Wolf We had to disable I/O throttling with synchronous requests because we didn't use to run timers in nested event loops when the code was introduced. This isn't true any more, and throttling works just fine even when using the synchronous API. The removed code is in fact dead code since commit a8823a3b ('block: Use blk_co_pwritev() for blk_write()') because I/O throttling can only be set on the top layer, but BlockBackend always uses the coroutine interface now instead of using the sync API emulation in block.c. Signed-off-by: Kevin Wolf Message-Id: <1458660792-3035-2-git-send-email-kwolf@redhat.com> Signed-off-by: Paolo Bonzini --- block/io.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/block/io.c b/block/io.c index 41d954ca..cbba269 100644 --- a/block/io.c +++ b/block/io.c @@ -561,17 +561,6 @@ static int bdrv_prwv_co(BlockDriverState *bs, int64_t offset, .flags = flags, }; - /** - * In sync call context, when the vcpu is blocked, this throttling timer - * will not fire; so the I/O throttling function has to be disabled here - * if it has been enabled. - */ - if (bs->io_limits_enabled) { - fprintf(stderr, "Disabling I/O throttling on '%s' due " - "to synchronous I/O.\n", bdrv_get_device_name(bs)); - bdrv_io_limits_disable(bs); - } - if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ bdrv_rw_co_entry(&rwco); -- 1.8.3.1