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: 960145 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="ILV4js/a"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vk0h69hVz9s78 for ; Tue, 21 Aug 2018 18:11:47 +1000 (AEST) Received: from localhost ([::1]:51462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs1lQ-0003sn-Gr for incoming@patchwork.ozlabs.org; Tue, 21 Aug 2018 04:11:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs1kg-0003sB-Hi for qemu-devel@nongnu.org; Tue, 21 Aug 2018 04:10:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fs1kd-0004VJ-3A for qemu-devel@nongnu.org; Tue, 21 Aug 2018 04:10:58 -0400 Received: from mail-pl0-x229.google.com ([2607:f8b0:400e:c01::229]:33073) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fs1kW-0004K3-Uu for qemu-devel@nongnu.org; Tue, 21 Aug 2018 04:10:50 -0400 Received: by mail-pl0-x229.google.com with SMTP id b90-v6so8441016plb.0 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=MHL4190qsgMvPs0S3m8AHES1dJoONbaNLno9hMGgdkmV69D9ZEM+kURYrNa/uXoF7S vTN2AhqkbEx/qUls0lL6HY/xVFHAoxGJXiTahCxmEJw60tzys9A/Shu7u31DxJc9KRVI 9OQwYsjFntUGn8ycJZPvt0MMcjFZ9UhH83sggRkR3P1mCA0km7rTEfJysLiINLM+gJ0f Hsvq7TNKjv9M6JVjUqjgpZpmibiWRtC1P/RTJAFheKK/Pqb73u7/b9sVrY1KtuOPqZA4 g9T69x9QDkvEd+gl3viT1LAakwIU/u1usdWobg/iTHioAIwi2rfdBmecsF2GGaKg/ntV PPHQ== X-Gm-Message-State: AOUpUlEtRk22DugCACtbWbVYINuw82LkZXES7rVoB5uaZFtyOv8fWZQ+ Em4aZBBjl530dmkPd7oFdxA= 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 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 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::229 Subject: [Qemu-devel] [PATCH v4 00/10] 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, 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 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(-)