From patchwork Thu Mar 24 16:39:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8662561 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83CA1C0553 for ; Thu, 24 Mar 2016 16:39:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB7BD203A0 for ; Thu, 24 Mar 2016 16:39:47 +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 0A083201F4 for ; Thu, 24 Mar 2016 16:39:47 +0000 (UTC) Received: from localhost ([::1]:51790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8IU-00011A-Cr for patchwork-qemu-devel@patchwork.kernel.org; Thu, 24 Mar 2016 12:39:46 -0400 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 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8IF-0001Vy-KF; Thu, 24 Mar 2016 12:39:31 -0400 Received: by mail-wm0-x242.google.com with SMTP id u125so14129511wmg.0; Thu, 24 Mar 2016 09:39:31 -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=6fl8LETKbOcG+u+Su6TwodCOaERBwPHzng6Hacvbwq0=; b=FPBSz6DIJmKLbFsPDBlS2FT2d3bTHyPXQIBkbS1K3hnaw+W0MzXrn3mwWlz5ndEPAb M6SUS5E2EHZI5lYRoimmqXi2y5yBCRlTRNIuKOkI/dA3FN7J9R6HNescrBZBravC2Fa6 hvAaG2gYuivvTtEmSWp2dKs+afXn8YH8zKEX+L3cOJq20zarTfLJEU2nQMubhP2TWnbU kOdCq8Y9mzhgn0Wxsv0zrq4jOczcO1thVzmbZ/a3HopdaPSkv89/zIo7G4DctfLajflv eQF647PYh+6QHOeBqI6lkXkTHFwahZ8uLPdZ2Io5Tvo24UYq4WU9CwhZ1FoganNRHOG8 ug0Q== 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=6fl8LETKbOcG+u+Su6TwodCOaERBwPHzng6Hacvbwq0=; b=DP4hqApx4ImP9m6RP4d1LPwkOc2a8yns7X8z7Q363EAOkhq7aRPqyP4KtFCDcYU36c F0KZwktvej3Yv5hVHMU9ETFXCgeSdaO+QVhhw9pCAn9kBEwkvTpYX4KgYeCyE9+UV4rt jm2C0nHpIOo3DeS22GnBu5w2j3MzHb4W7typ+lvQKPRo4wsYOtf+aq8sTap9O+v7Gg86 3KA8osjSd9MAagAhjTXKgaz5fedCb4wLMJ7+7fXA9sXc6IN6DeWodxKWkJ//tatfHMuI rIBnbPPSHOe+lI6oVnVxAYo9QmlJtSkAbPebx9fZn3d0Jl17PZCKt+IOfxyNfRBvcmJD q/Dw== X-Gm-Message-State: AD7BkJLzzlIIVYMqfPGb6T/bj+PhVcARkUBK16VpoSiaNqrKzGiAwYwtic3DNcdb4ysmPQ== X-Received: by 10.28.133.14 with SMTP id h14mr12059284wmd.100.1458837571006; Thu, 24 Mar 2016 09:39:31 -0700 (PDT) Received: from 640k.lan (94-39-161-17.adsl-ull.clienti.tiscali.it. [94.39.161.17]) by smtp.gmail.com with ESMTPSA id w125sm8508814wmw.18.2016.03.24.09.39.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Mar 2016 09:39:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 24 Mar 2016 17:39:20 +0100 Message-Id: <1458837566-108527-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1458837566-108527-1-git-send-email-pbonzini@redhat.com> References: <1458837566-108527-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::242 Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com, qemu-block@nongnu.org Subject: [Qemu-devel] [PATCH 1/7] 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 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);