From patchwork Thu Sep 6 07:00:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 966820 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=208.118.235.17; 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="b2wkPfIW"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 425Whf4qvZz9sDb for ; Thu, 6 Sep 2018 17:01:53 +1000 (AEST) Received: from localhost ([::1]:59857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxoIY-0001PF-3D for incoming@patchwork.ozlabs.org; Thu, 06 Sep 2018 03:01:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fxoI4-0001P9-DA for qemu-devel@nongnu.org; Thu, 06 Sep 2018 03:01:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fxoHz-000893-Tc for qemu-devel@nongnu.org; Thu, 06 Sep 2018 03:01:20 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:43827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fxoHw-00085d-1a for qemu-devel@nongnu.org; Thu, 06 Sep 2018 03:01:13 -0400 Received: by mail-pl1-x644.google.com with SMTP id h3-v6so1159295plh.10 for ; Thu, 06 Sep 2018 00:01:11 -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=Rze+ZGaF/7xfZwaI8UM1G+8Fdh40ge8bf0vK4CK3/18=; b=b2wkPfIWgK/ZIS/bzdoWX6G84/XSRjvIe5OJbCufjaM66Zl8kkp7b8/EYyIB3yq02s 79ktjvMXDw9i9FJ71ADb2fPCoD+rQbi0e6x9/c9FHNdz1P0ZZlPxmMmBm/+T4XhuaL1Y Ho+4tqdq0HC/ZP6uEN8QcpH8taFdjPtd/Gq5XPtc5RXiBurnXA+7fLCVjq/XI0pHTOtV yK8QvjnE0kT7mcEUeyxycT3nW2HN+F/5srhZNOPpFw2BKLOEMN6CRxJ1FVDkcrE+Lki+ efXohDnXsQhNPM9CIZFd3Zs74dQPYLy4YDxOKbObe/nteWBmjLzt+iALm55sEBXH/M1M fm6Q== 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=Rze+ZGaF/7xfZwaI8UM1G+8Fdh40ge8bf0vK4CK3/18=; b=lwAUhNIiQ2ef7haIpgR0GqLoAlhIq5Ocxv4FShSQnyka4KzowFz2cxTn+soJ2+V1DF XJUlrTycjCaKYUiFCFNLo1HedBMc9foCdZLByV5mNU3gp4jJyZKEETYEqLL9/jBl/aCl 9r0xgS+vI+6ypCIxjq3Qiun0cYaV79i/1SilDCFhe4X+AP61Zj3y+dxLryRjoKHnx7ZW Lb6mWIRXHVMnE+8vUttBdzAp7hDEWu1fp7Q3r17MWDlJrOnW2AemmJuL+QlPnOLJLBvg Bnhe677IBqqj1+E3GYjU0wessb3jOppunoMNr8UHcP/I8z9uHpGJ8csgbXN76HK1qa8h fm+g== X-Gm-Message-State: APzg51CUJ8/wcTRGXFip5VmttxlqUV6iJiTEACVICOxWmIChl1T7mLSQ JErWqwbrFI4Rbk5TJt33WQw= X-Google-Smtp-Source: ANB0VdZaxzy5ko4SikOBmvaO6R6IQdSwDw85icv3NGdpDIAwnvL0uBipxtNWDmMrucjBIpJR/pDxnQ== X-Received: by 2002:a17:902:6806:: with SMTP id h6-v6mr1359647plk.304.1536217270396; Thu, 06 Sep 2018 00:01:10 -0700 (PDT) Received: from localhost.localdomain ([203.205.141.37]) by smtp.gmail.com with ESMTPSA id u195-v6sm7697017pgb.21.2018.09.06.00.01.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Sep 2018 00:01:09 -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: Thu, 6 Sep 2018 15:00:58 +0800 Message-Id: <20180906070101.27280-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::644 Subject: [Qemu-devel] [PATCH v6 0/3] 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 v6: Thanks to Juan's review, in this version we 1) move flush compressed data to find_dirty_block() where it hits the end of memblock 2) use save_page_use_compression instead of migrate_use_compression in flush_compressed_data Xiao Guangrong (3): migration: do not flush_compressed_data at the end of iteration migration: show the statistics of compression migration: use save_page_use_compression in flush_compressed_data hmp.c | 13 +++++++++++ migration/migration.c | 12 ++++++++++ migration/ram.c | 63 +++++++++++++++++++++++++++++++++++++++++++-------- migration/ram.h | 1 + qapi/migration.json | 26 ++++++++++++++++++++- 5 files changed, 105 insertions(+), 10 deletions(-)