From patchwork Mon Sep 3 09:26:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 965318 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TlgbKIjb"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 423l416Sw4z9s3C for ; Mon, 3 Sep 2018 19:27:29 +1000 (AEST) Received: from localhost ([::1]:44248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwl8p-00075j-He for incoming@patchwork.ozlabs.org; Mon, 03 Sep 2018 05:27:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwl8M-00075T-FX for qemu-devel@nongnu.org; Mon, 03 Sep 2018 05:26:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fwl8H-00041Q-KS for qemu-devel@nongnu.org; Mon, 03 Sep 2018 05:26:58 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:38660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fwl8H-00041H-Dp for qemu-devel@nongnu.org; Mon, 03 Sep 2018 05:26:53 -0400 Received: by mail-pg1-x530.google.com with SMTP id f4-v6so3064983pgq.5 for ; Mon, 03 Sep 2018 02:26:53 -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=Ej6ZuAtMP6Tn7q2eykjCojIQTBqtL4v9VHtA7AvK1nk=; b=TlgbKIjbaw0HqQT1EiDyNM1jNqRddv8nLc9D41YidvhB3NM79yTGNZ7dZ813sfRnP8 8DPcz3e99/VzvB0GTrxO6EJAkFikhZsyXVraftcErPfxg+QTHMMWSpz91XPkCOdyppDq /d3xTua9nOeU3JGFKxmUXjg1aMX6hW9syRMQIXXuicxEaH5mZCEj+tWvPij/pE/zUU5W SccLWT7OhQ6ylL45nGIKj+ZZyH7e/Sj2n3wyJHGYOI4+5RUtgWOMSRELUirxs6ptJqCy 8UtVIO8qKmgv/6anAWOorTX/TamRONmBVFtTOsNozKxQgPkC0+gJ0zgLrf4DaeU32PAx nNfQ== 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=Ej6ZuAtMP6Tn7q2eykjCojIQTBqtL4v9VHtA7AvK1nk=; b=X5MtCvU9YCSOBsWwxbsPbIdBPYqCmfe64An7ex6YhxI1lPpt0U/GOp5jbGV+4l+01C whIaLUkevtAg7QeAVTfH2EMZuWNp2tAW/b01D/XTl/6VyWnu0AyvtbWrZbuq+3EBnyT/ zIVQt/dZHRQTRBTf4NrbXTpVfFXF450jqfWeTsLMYZ8vD65GehnmGKT/OIfs13IjMhHb c6kl90tD6zdCrF8K8m82mhNxOJBBSwXoxutIzdHmwptEH+nSdsbR+7UKTJ9HBfpT0jrN DkabRZcxBsSllu3+cUK4KVoIyEeoEc05KSESbrR7Jxx3MZyDqF1GD9H6bHF1raFBv1N5 ZXtQ== X-Gm-Message-State: APzg51B81mtbM69CCvJXgWHBO7bDkFrHzQNe3gAm4q1JNBmgSyGJ1sry VucQ38Z95HBh85ckLlQJVmw= X-Google-Smtp-Source: ANB0VdZySiq+N4fEZheGYO2he++uDnD6PvXTZcFLPMl32T8EPfjLpMO+bZ5GlH58MKV9lD+FFsUGHA== X-Received: by 2002:a63:4606:: with SMTP id t6-v6mr25105342pga.271.1535966812503; Mon, 03 Sep 2018 02:26:52 -0700 (PDT) Received: from localhost.localdomain ([203.205.141.40]) by smtp.gmail.com with ESMTPSA id 3-v6sm33543102pfq.10.2018.09.03.02.26.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Sep 2018 02:26:52 -0700 (PDT) From: guangrong.xiao@gmail.com X-Google-Original-From: xiaoguangrong@tencent.com To: pbonzini@redhat.com, mst@redhat.com, mtosatti@redhat.com Date: Mon, 3 Sep 2018 17:26:40 +0800 Message-Id: <20180903092644.25812-1-xiaoguangrong@tencent.com> X-Mailer: git-send-email 2.14.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::530 Subject: [Qemu-devel] [PATCH v5 0/4] migration: compression optimization 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: kvm@vger.kernel.org, quintela@redhat.com, Xiao Guangrong , qemu-devel@nongnu.org, peterx@redhat.com, dgilbert@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Xiao Guangrong Changelog in v5: use the way in the older version to handle flush_compressed_data in the iteration, i.e, introduce dirty_sync_count and flush compressed data if the count is changed. That's because we should post the data after QEMU_VM_SECTION_PART has been posted out. Peter, I have dropped your Reviewed-by on this patch, please review. :) Xiao Guangrong (4): migration: do not flush_compressed_data at the end of each iteration migration: fix calculating xbzrle_counters.cache_miss_rate migration: show the statistics of compression migration: handle the error condition properly hmp.c | 13 ++++++++ migration/migration.c | 12 +++++++ migration/ram.c | 91 +++++++++++++++++++++++++++++++++++++++++++-------- migration/ram.h | 1 + qapi/migration.json | 26 ++++++++++++++- 5 files changed, 128 insertions(+), 15 deletions(-)