From patchwork Thu Apr 7 16:33:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8774861 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E9929FBEA for ; Thu, 7 Apr 2016 16:36:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3859120251 for ; Thu, 7 Apr 2016 16:36:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B8FB20155 for ; Thu, 7 Apr 2016 16:36:48 +0000 (UTC) Received: from localhost ([::1]:51322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoCvH-0006QE-W4 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Apr 2016 12:36:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoCsK-0001J2-DG for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:33:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoCsH-0005jK-DE for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:33:44 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoCsH-0005jF-62; Thu, 07 Apr 2016 12:33:41 -0400 Received: by mail-wm0-x241.google.com with SMTP id y144so5806336wmd.0; Thu, 07 Apr 2016 09:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=fgEHJ2Q4sqaLgwWIYoiTGsifr7SNk4fCpEI+Clqunq4=; b=ooYAK8EVS6UUGwIoeStmAJdFuhGRT4DJi9s1kBD87Xovo5kN5oWxjvDndmGVimD6dg dt1rvFGhFeNfM2iY30r97WoxoyEG0U4Q788bEBof8jUbGXN7frUImNWUElGSdPDPmC5L 2MZjlb+zHYRSPa6vvmPHtPUhJm2RoU7EbedGgK2a3XtmUkeMXxUthugDN3LaRjvsTCv6 an8/bUuBkUe/F2O+XeB2n3oMXsPjidb/j+ykU8ZuitGiWVYX/7HOsGXs4rrrS0Re/a2K 6qWeiXq0ozzeoIvfAUK8nkHBiFuhCmszEICrA2/E6+EpEbqufL/flfhmiO2DVZOUBMMZ E0dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=fgEHJ2Q4sqaLgwWIYoiTGsifr7SNk4fCpEI+Clqunq4=; b=BQn5DqzSpBn+T3/IWwt0xeJ+Z/753Yf3W66+rZdNCLXc8eEecL3khFx2I7T/nMl+nZ o14i08uFA13U+PpQI54u5UFwC0scAOPP+axIVrzCbAiKQRX/N7r9EX5pvHIc7+XtjHkI RdJuvw2z7iYlk06O4RfpC7A8ZRW9ldYboAbd/wiML6KJgQd7tFdYmx70orAsGnBABDJ/ j1lbDDNPVPr/FYEqzeKjU3ijxz5gl9NVM/DUW4FovNjTGUFSMwB6kBlUjEqHYXXyfm5Y zhLj8dGSxyFsHQ4Em4J4o3//vMLT5mvUD/wM4hW9jWwc8y6uFdyQpJknwcb+bByIXUZo 5qWw== X-Gm-Message-State: AD7BkJI5E/E7vRoxEHrn6L+rN2zLzJaXpqTDeemswJi1SqLXmGUzYBIGfbFdclPuy8WoNA== X-Received: by 10.194.246.137 with SMTP id xw9mr5067252wjc.172.1460046820612; Thu, 07 Apr 2016 09:33:40 -0700 (PDT) Received: from 640k.lan (94-39-141-76.adsl-ull.clienti.tiscali.it. [94.39.141.76]) by smtp.gmail.com with ESMTPSA id hh8sm9218862wjc.42.2016.04.07.09.33.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Apr 2016 09:33:39 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 7 Apr 2016 18:33:29 +0200 Message-Id: <1460046816-102846-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1460046816-102846-1-git-send-email-pbonzini@redhat.com> References: <1460046816-102846-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Cc: kwolf@redhat.com, berto@igalia.com, famz@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v4 1/8] block: Don't disable I/O throttling on sync requests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 a7dbf85..a91d862 100644 --- a/block/io.c +++ b/block/io.c @@ -608,17 +608,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);