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: 10589933 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 5D5AE174C for ; Thu, 6 Sep 2018 07:01:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52F452A4FE for ; Thu, 6 Sep 2018 07:01:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 432692A509; Thu, 6 Sep 2018 07:01:13 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8831E2A4FE for ; Thu, 6 Sep 2018 07:01:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727611AbeIFLfJ (ORCPT ); Thu, 6 Sep 2018 07:35:09 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:45685 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725919AbeIFLfJ (ORCPT ); Thu, 6 Sep 2018 07:35:09 -0400 Received: by mail-pl1-f193.google.com with SMTP id j8-v6so4513382pll.12 for ; Thu, 06 Sep 2018 00:01:10 -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=jejavbUSaAra5b+48YpzgTP3zgZbCHJrCkT6yV0hlQIU21NXzMyAcGy9YUYNspH+xE VoXVANwF3GjYkGiuIS37m8Yuaz9C3OZydGtg7SIu6cxw+iZTmjz3nDguGfIQupQJ1zx4 5Cbktk1FAI0NiOA4/Jv/1eVjbqFEXMhJJmmlNiS3SEbbEyc1J2DL59fg92l8axnQ+xru 9Kt0uLUmly0xzhGy3oN8KJZKDFIZeJ6f6qK6S6xuf9DOc2TWeyM9iB5QC3vN/6HyueJ6 mI9j9YKhUsAM79Y/xH/nR+s9C3xIe3mQ4qPXVyH74wZ6wga9v3vY1rTOoF/f4h0/fKyZ g9yA== X-Gm-Message-State: APzg51CSsvGXSmnjKamPXaDdWSF3oC65a153lokmMDfISWmSKv5Fs6ts 5vSAKkxQ82DD9wzsPU1eIvg= 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 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, dgilbert@redhat.com, peterx@redhat.com, wei.w.wang@intel.com, jiang.biao2@zte.com.cn, eblake@redhat.com, quintela@redhat.com, Xiao Guangrong Subject: [PATCH v6 0/3] migration: compression optimization 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 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-)