From nobody Thu May 2 15:19:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489478308369185.66810539333903; Tue, 14 Mar 2017 00:58:28 -0700 (PDT) Received: from localhost ([::1]:56958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnhLe-0002Yd-Px for importer@patchew.org; Tue, 14 Mar 2017 03:58:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnhLD-0002Y9-0I for qemu-devel@nongnu.org; Tue, 14 Mar 2017 03:57:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnhLC-0003uK-BH for qemu-devel@nongnu.org; Tue, 14 Mar 2017 03:57:59 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:36109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnhL8-0003kt-2s; Tue, 14 Mar 2017 03:57:54 -0400 Received: by mail-pg0-x241.google.com with SMTP id 25so22782993pgy.3; Tue, 14 Mar 2017 00:57:53 -0700 (PDT) Received: from localhost.localdomain ([119.28.70.108]) by smtp.gmail.com with ESMTPSA id v4sm36706324pfb.36.2017.03.14.00.57.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Mar 2017 00:57:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5YpXivYKv31qizuC9cfpE7VNYh3bl4xnLeNNeEM/Oc8=; b=SEU5/maB3yoayPJgKgbdYNGNqOWi1e07UV/vuHKOTJl18gBHcwzpPIb1CtxZzPJpEu MC66rktYt7TXY6dgetXW/S+Bf6v5fyiOBG0+/RdRf0lCrjd+5M6Zpybjnln0nvtMUCK3 If4deLF4BIUNfpc8Qr08RBuWxFI+XH+uJfZMs2bVwerfy/0b/2c+JnYYYiA+jsfHef6y aL2itQskk+0K219EkBjBa6msSaP7E4VwFX+CcIkGmSED4G+S4TTAyieIgdN3CTZii4Yj twEORtYIp9/Q3peKheF+XkGjQuWuY2gyVG4fp05KdCRkHkdQHeLB9AYEzgSEutX+7J3T 8SBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5YpXivYKv31qizuC9cfpE7VNYh3bl4xnLeNNeEM/Oc8=; b=KlkVdJy8jXY7b92w8Pkqjwe45ohulKppdjEP91ONqDWleVyILxbCjoQm+KCP9a0vSa IxhblYRyQtLQyho1ybQXQVpVe0/lhlvFeBPYxst5ZqLrehBbwKVESrjvNTFI3JfDvT/W DXlm/KIh4Y66F3QnRPrY93c2YG3zTnYn7xPyFoJRu9KRzs8baZ529/vtMXrarLYGYPo5 5Yw8X/57+gAQqQWiILcSBksdLFrxRuJg/VmLtU6a/WGrY+wv1rs4rmLGGp9cycNlB/xj uulkuBdtfcTM8HneX/nvG4aovJFaKrcz7wjSDYOxvcwJrhXH+cedoWqfskpd+bANzYEL iDqA== X-Gm-Message-State: AMke39ny04sYlHmmaZ2iBynFO3U2m1sZx/IPBRBoaNC3IH0EwxiBG4k1Lxa9PcNGZSvy/A== X-Received: by 10.98.29.216 with SMTP id d207mr42262510pfd.144.1489478272570; Tue, 14 Mar 2017 00:57:52 -0700 (PDT) From: jemmy858585@gmail.com To: stefanha@redhat.com, famz@redhat.com, quintela@redhat.com, dgilbert@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Tue, 14 Mar 2017 15:57:23 +0800 Message-Id: <1489478243-10366-1-git-send-email-jemmy858585@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [PATCH] migration/block: Avoid involve into blk_drain too frequently X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lidong Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Lidong Chen Increase bmds->cur_dirty after submit io, so reduce the frequency involve i= nto blk_drain, and improve the performance obviously when block migration. Signed-off-by: Lidong Chen --- migration/block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/block.c b/migration/block.c index 6741228..f059cca 100644 --- a/migration/block.c +++ b/migration/block.c @@ -576,6 +576,8 @@ static int mig_save_device_dirty(QEMUFile *f, BlkMigDev= State *bmds, } =20 bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, sector, nr_sectors= ); + sector +=3D nr_sectors; + bmds->cur_dirty =3D sector; break; } sector +=3D BDRV_SECTORS_PER_DIRTY_CHUNK; --=20 1.8.3.1