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: 10585635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E3FDB920 for ; Mon, 3 Sep 2018 09:28:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8CB42908B for ; Mon, 3 Sep 2018 09:28:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACDAE29092; Mon, 3 Sep 2018 09:28:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 628302908B for ; Mon, 3 Sep 2018 09:28:03 +0000 (UTC) Received: from localhost ([::1]:44251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fwl9O-0001Mk-M8 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 03 Sep 2018 05:28:02 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(-)