From patchwork Thu May 7 18:31:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Liang Z" X-Patchwork-Id: 469291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EC32C14027F for ; Thu, 7 May 2015 16:40:59 +1000 (AEST) Received: from localhost ([::1]:48730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqFUQ-0001uI-83 for incoming@patchwork.ozlabs.org; Thu, 07 May 2015 02:40:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqFTs-0001Th-2b for qemu-devel@nongnu.org; Thu, 07 May 2015 02:40:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqFTn-0001lo-QZ for qemu-devel@nongnu.org; Thu, 07 May 2015 02:40:24 -0400 Received: from mga14.intel.com ([192.55.52.115]:45909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqFTn-0001li-M0 for qemu-devel@nongnu.org; Thu, 07 May 2015 02:40:19 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 06 May 2015 23:40:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,383,1427785200"; d="scan'208";a="725128053" Received: from ll.sh.intel.com (HELO localhost) ([10.239.13.40]) by orsmga002.jf.intel.com with ESMTP; 06 May 2015 23:40:16 -0700 From: Liang Li To: qemu-devel@nongnu.org Date: Fri, 8 May 2015 02:31:22 +0800 Message-Id: <1431023482-9044-1-git-send-email-liang.z.li@intel.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.55.52.115 Cc: amit.shah@redhat.com, yang.z.zhang@intel.com, Liang Li , quintela@redhat.com Subject: [Qemu-devel] [PATCH] migration: Fix migration state update issue 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org If live migration is very fast and can be completed in 1 second, the dirty_sync_count of MigrationState will not be updated. Then you will see "dirty sync count: 0" in qemu monitor even if the actual dirty sync count is not 0. Signed-off-by: Liang Li Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela --- arch_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index 4c8fcee..a48f575 100644 --- a/arch_init.c +++ b/arch_init.c @@ -599,8 +599,8 @@ static void migration_bitmap_sync(void) s->dirty_bytes_rate = s->dirty_pages_rate * TARGET_PAGE_SIZE; start_time = end_time; num_dirty_pages_period = 0; - s->dirty_sync_count = bitmap_sync_count; } + s->dirty_sync_count = bitmap_sync_count; } /**