From patchwork Tue Aug 21 08:10:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 10571171 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 39BE5920 for ; Tue, 21 Aug 2018 08:10:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B68529DB2 for ; Tue, 21 Aug 2018 08:10:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 282DF29DEE; Tue, 21 Aug 2018 08:10:46 +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 1A25129DDD for ; Tue, 21 Aug 2018 08:10:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726627AbeHUL3u (ORCPT ); Tue, 21 Aug 2018 07:29:50 -0400 Received: from mail-pl0-f47.google.com ([209.85.160.47]:40095 "EHLO mail-pl0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726315AbeHUL3u (ORCPT ); Tue, 21 Aug 2018 07:29:50 -0400 Received: by mail-pl0-f47.google.com with SMTP id s17-v6so8434045plp.7 for ; Tue, 21 Aug 2018 01:10:43 -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=VKo4IRzspi9jJaD8lH1UMmkxIZA1yIONco9nXUlksFA=; b=ILV4js/aKcTsDKZ9IkwsZklS1hKmFaJeCHM5cg+bVllHNOaEwNhHEc6KtOIT6roNFf u5921IJeQuzqoBIrZQ0YD4SUyuIwvZEbn1wgCd2Bvm4rz1pDX83G4gvYSm1xMmZxAQfR W4eqi/qaElX3cKBiecugUIqgM7Cicdc1oFDmnSruuxjbpuNr7ohT55b8alZ/n0hOiRlE EHtM1EpF8ClywimbAcWQN0Rxau2VRaLpHXK60X1SHmSvKV/LE0P0t6aCTNPWq3G2nMR1 mLoIYBNwWkdWQbDvWjCz2GlTGi6g67CDsJPfdABhPhDT0nAIepN1Kp1eLBRZSut/N2Sq d3tw== 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=VKo4IRzspi9jJaD8lH1UMmkxIZA1yIONco9nXUlksFA=; b=XB4U1MYpIgajM7bEHTHawasj8fQLCCH9+Zwl/Hu7ZZvRj63K2OzbirzCBWFjwCUOg1 UNz+QkgGB+mUWXbw+QAkcXgs7eUH1WTxHbNkbNE8UnADaq3YGSgv2ZB4lSx+C/cmrlY+ yTnMgkL2fUNGeEqhOorF5yHxJj6tVX4aKZPNOtcN7Oz6lZk0V3KE1s261mRfruXtQN0+ TN9eY5QnlV3urM6Z6wvI2+NhdvmTTQRN2VEYqkngtTZQpraP7dMu85MNwtAV8PC07QgA NhQeZlVZhoX9nNZtTvLI76te7tlir4rCt1Ay/prJ9aMWAlwo/3USbFYw/tQdMoLlEabd 0kIQ== X-Gm-Message-State: AOUpUlFIGcyaF+rZSn6DSz/wnUVK4pgVa2tDTJ+h5DAoCsR1rjn6v9Xh HqgpUOxpZBRvqVXWjmUrsAQ= X-Google-Smtp-Source: AA+uWPzKp39Km/VyyZPStKHK4RHSJ4I+nkyIIlkYlJec0iLo5aQus6UDXyR+fgh08lMo7/fRNZxN8Q== X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr48392802plp.14.1534839042831; Tue, 21 Aug 2018 01:10:42 -0700 (PDT) Received: from localhost.localdomain ([203.205.141.40]) by smtp.gmail.com with ESMTPSA id r64-v6sm20644023pfk.157.2018.08.21.01.10.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Aug 2018 01:10:42 -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, Xiao Guangrong Subject: [PATCH v4 00/10] migration: compression optimization Date: Tue, 21 Aug 2018 16:10:19 +0800 Message-Id: <20180821081029.26121-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 v4: These changes are based on the suggestion from Peter Eric. 1) improve qapi's grammar 2) move calling flush_compressed_data to migration_bitmap_sync() 3) rename 'handle_pages' to 'target_page_count' Note: there is still no clear way to fix handling the error condition returned by ram_find_and_save_block(), i moved the patch to the end of this series, hope it's good to help to merge this patchset Xiao Guangrong (10): migration: do not wait for free thread migration: fix counting normal page for compression migration: introduce save_zero_page_to_file migration: drop the return value of do_compress_ram_page migration: move handle of zero page to the thread migration: hold the lock only if it is really needed 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 | 21 ++++ include/qemu/queue.h | 1 + migration/migration.c | 33 +++++ migration/migration.h | 1 + migration/ram.c | 329 +++++++++++++++++++++++++++++++++++--------------- migration/ram.h | 1 + qapi/migration.json | 53 +++++++- 7 files changed, 333 insertions(+), 106 deletions(-)