From patchwork Fri Oct 18 18:25:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yong Huang X-Patchwork-Id: 1999337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=SBXUet/p; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XVY6q5ykXz1xw2 for ; Sat, 19 Oct 2024 05:25:55 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1rfD-0005Q3-Kw; Fri, 18 Oct 2024 14:25:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1rf7-0005PH-UX for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:23 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1rf4-0001zA-1I for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:20 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-20c9978a221so29198735ad.1 for ; Fri, 18 Oct 2024 11:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1729275916; x=1729880716; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZpMHIY0r4zxTQh2swSvg+GZsV7fq2GTEZc/p/hvrbE4=; b=SBXUet/pqrJXcvps6zicLTVALIoT9M6Aj1rT0lSk3HXFufKbTf2igVgv6Ce0x7og70 hJ8rdKnq26kuGkwUFsAEltTD4hxKPud+f4psk9mcZU5H6uWvfE4lLSzqpyV8Y2lBZU2X Jh2uqiPKBYCzFTeNwnUk9zn7Pt1ORI3NeWVzAfrReW/pmIBtxMZHEQlOEYpUOjkQVsvc AJQ1Vnlt8jYo11tPhPgqk56dB5oHSQcPovG2EjHx1e2pD86GiRGwrKQKoBQd9P3DrOtj NW4DyGWjeOTJSpUuH0eup7BM/ObC99mGCpaJOff4ukouOi4uE8lX4kEbX4mMdnBUQVQI TiuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729275916; x=1729880716; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZpMHIY0r4zxTQh2swSvg+GZsV7fq2GTEZc/p/hvrbE4=; b=Whon2Aix6L+BwnRZ8CjIhS+okHk5gQnlLQ4bVbr6MqAIqWsl3b+mXok+pUP6TKfoxJ 6+YbZMBG9yUD0kXVKlJLO0JHw1u7l2N0TcsQZE+MiRmLecDXKGvGCe/OEvKpgMNRb9H7 10IuA1DmNI0VzL5PxkoCiin497XxFc4geUs26/qwRweJhM1Y0u53HPDVLF6MycMWJzbl ycWcrbvP3HcKedNGUFDKliWa8+liei7pBJ3IDoQi0EUT2D3u+tGVwrACpy1Z9v8WTfXv zj+EBkGk6F8Z5CweXcalJTchnZLxpUrGhHHMvoGBOzPlEaY6rOPeWOrha9AhWCW+ZRDY APGQ== X-Gm-Message-State: AOJu0YxI4qt8m2bcXFEv+eI9Oo/WGq7l4lYfN0WYmIhVhZR4uuHhm3Lz gOfKsFiwrV4xOucIdon3nIAVnJNJwmA9K3MtgW/YtrKT5lpZkRtoG30O+SzLfrXcS7fEhY4FvZh 3EvfuJQ== X-Google-Smtp-Source: AGHT+IEtz96fYPzf4dHP4pscg+MEy3hQE84ygZJv276gzdCQN1gO7XZivLnVUty0o416TTwahEQgIQ== X-Received: by 2002:a17:902:ea02:b0:20c:9821:699d with SMTP id d9443c01a7336-20e5a915380mr40552935ad.51.1729275914998; Fri, 18 Oct 2024 11:25:14 -0700 (PDT) Received: from localhost.localdomain ([118.114.60.204]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e5a8f2034sm15668475ad.193.2024.10.18.11.25.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 11:25:14 -0700 (PDT) From: Hyman Huang To: qemu-devel@nongnu.org Cc: Peter Xu , Fabiano Rosas , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , yong.huang@smartx.com Subject: [PATCH v2 1/5] tests/migration: Move the guestperf tool to scripts directory Date: Sat, 19 Oct 2024 02:25:03 +0800 Message-Id: <52c9b1f94ef5a9451e462a27ca8386190317e22b.1729275266.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Guestperf was designed to test the performance of migration, with a loose connection to the fundamental test cases of QEMU. To improve the repository's structure, move it to the scripts directory. Add myself as a maintainer for the guestperf so that I can help to fix bugs. Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrangé --- MAINTAINERS | 5 +++++ {tests => scripts}/migration/guestperf-batch.py | 0 {tests => scripts}/migration/guestperf-plot.py | 0 {tests => scripts}/migration/guestperf.py | 0 {tests => scripts}/migration/guestperf/__init__.py | 0 {tests => scripts}/migration/guestperf/comparison.py | 0 {tests => scripts}/migration/guestperf/engine.py | 0 {tests => scripts}/migration/guestperf/hardware.py | 0 {tests => scripts}/migration/guestperf/plot.py | 0 {tests => scripts}/migration/guestperf/progress.py | 0 {tests => scripts}/migration/guestperf/report.py | 0 {tests => scripts}/migration/guestperf/scenario.py | 0 {tests => scripts}/migration/guestperf/shell.py | 0 {tests => scripts}/migration/guestperf/timings.py | 0 14 files changed, 5 insertions(+) rename {tests => scripts}/migration/guestperf-batch.py (100%) rename {tests => scripts}/migration/guestperf-plot.py (100%) rename {tests => scripts}/migration/guestperf.py (100%) rename {tests => scripts}/migration/guestperf/__init__.py (100%) rename {tests => scripts}/migration/guestperf/comparison.py (100%) rename {tests => scripts}/migration/guestperf/engine.py (100%) rename {tests => scripts}/migration/guestperf/hardware.py (100%) rename {tests => scripts}/migration/guestperf/plot.py (100%) rename {tests => scripts}/migration/guestperf/progress.py (100%) rename {tests => scripts}/migration/guestperf/report.py (100%) rename {tests => scripts}/migration/guestperf/scenario.py (100%) rename {tests => scripts}/migration/guestperf/shell.py (100%) rename {tests => scripts}/migration/guestperf/timings.py (100%) diff --git a/MAINTAINERS b/MAINTAINERS index c21d6a2f9e..c7938c397c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3403,6 +3403,11 @@ F: migration/dirtyrate.h F: include/sysemu/dirtyrate.h F: docs/devel/migration/dirty-limit.rst +Migration performance test tool +M: Hyman Huang +S: Maintained +F: scripts/migration/guestperf* + Detached LUKS header M: Hyman Huang S: Maintained diff --git a/tests/migration/guestperf-batch.py b/scripts/migration/guestperf-batch.py similarity index 100% rename from tests/migration/guestperf-batch.py rename to scripts/migration/guestperf-batch.py diff --git a/tests/migration/guestperf-plot.py b/scripts/migration/guestperf-plot.py similarity index 100% rename from tests/migration/guestperf-plot.py rename to scripts/migration/guestperf-plot.py diff --git a/tests/migration/guestperf.py b/scripts/migration/guestperf.py similarity index 100% rename from tests/migration/guestperf.py rename to scripts/migration/guestperf.py diff --git a/tests/migration/guestperf/__init__.py b/scripts/migration/guestperf/__init__.py similarity index 100% rename from tests/migration/guestperf/__init__.py rename to scripts/migration/guestperf/__init__.py diff --git a/tests/migration/guestperf/comparison.py b/scripts/migration/guestperf/comparison.py similarity index 100% rename from tests/migration/guestperf/comparison.py rename to scripts/migration/guestperf/comparison.py diff --git a/tests/migration/guestperf/engine.py b/scripts/migration/guestperf/engine.py similarity index 100% rename from tests/migration/guestperf/engine.py rename to scripts/migration/guestperf/engine.py diff --git a/tests/migration/guestperf/hardware.py b/scripts/migration/guestperf/hardware.py similarity index 100% rename from tests/migration/guestperf/hardware.py rename to scripts/migration/guestperf/hardware.py diff --git a/tests/migration/guestperf/plot.py b/scripts/migration/guestperf/plot.py similarity index 100% rename from tests/migration/guestperf/plot.py rename to scripts/migration/guestperf/plot.py diff --git a/tests/migration/guestperf/progress.py b/scripts/migration/guestperf/progress.py similarity index 100% rename from tests/migration/guestperf/progress.py rename to scripts/migration/guestperf/progress.py diff --git a/tests/migration/guestperf/report.py b/scripts/migration/guestperf/report.py similarity index 100% rename from tests/migration/guestperf/report.py rename to scripts/migration/guestperf/report.py diff --git a/tests/migration/guestperf/scenario.py b/scripts/migration/guestperf/scenario.py similarity index 100% rename from tests/migration/guestperf/scenario.py rename to scripts/migration/guestperf/scenario.py diff --git a/tests/migration/guestperf/shell.py b/scripts/migration/guestperf/shell.py similarity index 100% rename from tests/migration/guestperf/shell.py rename to scripts/migration/guestperf/shell.py diff --git a/tests/migration/guestperf/timings.py b/scripts/migration/guestperf/timings.py similarity index 100% rename from tests/migration/guestperf/timings.py rename to scripts/migration/guestperf/timings.py From patchwork Fri Oct 18 18:25:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yong Huang X-Patchwork-Id: 1999340 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=ZYUnOvld; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XVY7X5nKWz1xwD for ; Sat, 19 Oct 2024 05:26:32 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1rfF-0005Qv-J9; Fri, 18 Oct 2024 14:25:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1rf8-0005PM-Rn for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:23 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1rf5-0001zI-Ik for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:21 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-20cf6eea3c0so20209955ad.0 for ; Fri, 18 Oct 2024 11:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1729275918; x=1729880718; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2pyz0EFgYWp+Ectgauwm/SteapQn+DCIa+M0WuvsOpU=; b=ZYUnOvldQhgWNOp1oIMlbFl9V7EH3L+Ac3CVD9MocmO7UvRwEScPG5Q7aEXv/MhZIZ fPsDhWLmrj8liJ6g1x1eNbdXZDlmOnB6uf1IVhqlAStP5ePga/pxPwpFI28UjWTtyjo9 6qokTTOBDBp0RjkYaRVTikQqaA+8jZ0yJKBfGrGGss06uC5F02+YPqjQoOjjE9sa8qHs ey4xPHEcNLt3yh+4KuNaJALulJFc9MhJZPcYah6e+f8KZbOTeIezovbRRI0z/kJ8mRcc gG5yqWkjfTZxd6uCA2ZnXhFscMas9KsehtPoWuIqOVaCFd2LMY7BGnUYcOnCisOX4t69 WUxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729275918; x=1729880718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2pyz0EFgYWp+Ectgauwm/SteapQn+DCIa+M0WuvsOpU=; b=Ls2zlvD49W4EdngODiWps+ssJY/NzB9nKeIdUVV4X5oFCrcWXbDNGJK9Cgs1vOWxJi O7eIcQTKxcPFvM4Jnqe4BrDozLdLwzK+erT3vPTgZ0J1IdkEv6d4zzanT40pZXU4pp9e RwYpp9R0p3giFwDTkMJtvsBtSBBMgEE/BGn9YIh/SBlQIuvqZoUh6mGIcdBFzDS0c8+f GVEg1W1S6zJbZ8Yx5Z/GxDazFdAEiL0TzNMA9ufUgyfZ2BmBeKr5JpVyPFSP+36ZHYNZ AB1zHVK3fHlU/dk5nL+gml/xk8dqEi+QKNCMF8i+UV9SnA78ODksJtm8ppOGB57fn6SY aC2g== X-Gm-Message-State: AOJu0YwPB2ICPUMdK5u697K6/DvCzR/1T4RLYvu1HqxaODXomhjckX4g osSTMyD84uRmjNgtCOCBozLNNBj05klvGf5q3FA9HZ4i5yvFnQKqAqe6MzMlKOLbnbuRy82WpC8 e9lXnQQ== X-Google-Smtp-Source: AGHT+IEhNzSJ48glKIw/gGco0NbvDH1koK/rB1bN9TLW+O4aIeX2keEnOTZtpBY9MdCZH4Djjjd83Q== X-Received: by 2002:a17:902:e80c:b0:202:26d:146c with SMTP id d9443c01a7336-20e5a71b6ecmr38963315ad.5.1729275917276; Fri, 18 Oct 2024 11:25:17 -0700 (PDT) Received: from localhost.localdomain ([118.114.60.204]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e5a8f2034sm15668475ad.193.2024.10.18.11.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 11:25:17 -0700 (PDT) From: Hyman Huang To: qemu-devel@nongnu.org Cc: Peter Xu , Fabiano Rosas , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , yong.huang@smartx.com Subject: [PATCH v2 2/5] tests/migration: Make initrd-stress.img built by default Date: Sat, 19 Oct 2024 02:25:04 +0800 Message-Id: <777e9f8e3fe4d0e565cf62efbef6cda83a6b06a4.1729275266.git.yong.huang@smartx.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The initrd-stress.img was compiled by specifying the target, to make it easier for developers to play the guestperf tool, make it built when dependencies suffices. Signed-off-by: Hyman Huang --- tests/migration/meson.build | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/tests/migration/meson.build b/tests/migration/meson.build index a91aa61c65..d9e5b0d241 100644 --- a/tests/migration/meson.build +++ b/tests/migration/meson.build @@ -1,18 +1,25 @@ +sysprof = not_found +glib_static = not_found + sysprof = dependency('sysprof-capture-4', method: 'pkg-config', required: false) glib_static = dependency('glib-2.0', version: glib_req_ver, required: false, method: 'pkg-config', static: true) -stress = executable( - 'stress', - files('stress.c'), - dependencies: [glib_static, sysprof], - link_args: ['-static'], - build_by_default: false, -) -custom_target( - 'initrd-stress.img', - output: 'initrd-stress.img', - input: stress, - command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'] -) +if host_os == 'linux' and sysprof.found() and glib_static.found() + stress = executable( + 'stress', + files('stress.c'), + dependencies: [glib_static, sysprof], + link_args: ['-static'], + ) + + custom_target( + 'initrd-stress.img', + output: 'initrd-stress.img', + input: stress, + command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'], + build_by_default: true, + depends: [stress], + ) +endif From patchwork Fri Oct 18 18:25:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yong Huang X-Patchwork-Id: 1999341 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=cHgUb1eL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XVY7p25p2z1xw2 for ; Sat, 19 Oct 2024 05:26:46 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1rfG-0005RB-Ce; Fri, 18 Oct 2024 14:25:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1rfA-0005PX-Oz for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:25 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1rf8-0001zY-Kb for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:24 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-20cb7139d9dso22957785ad.1 for ; Fri, 18 Oct 2024 11:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1729275920; x=1729880720; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=f4rXhcsu75RQ6qJ8BqPK5pJGFSBb9OK02xFD1ELB+RE=; b=cHgUb1eLYJMUSx2Kd7C4fdQjqAVDVrwsJ97CQKYMSSUqntm8enpzYJH1KawXiBFSmy IJzxyvGqxQ452RnON5kRTzshxgXQmRBHfKmnM4m8Fq4lpxRV8KlppfOoxqSvT4DJuru3 IMrp7a8YN1EQGY32kQlAWBLhMmFzDwGNJfG7qXnQOwjGujk00DZ30sKCrfK+YYg+xd25 g3kCMnYiBLOZBHJSbheOG5y9tCEbB9RDG+MH50NV1AyWzCj7R5xL4ZHtlDrmZ5aEIFkr IIX3yEpdFsqFhYj0qJI/GThjPyXoX/jt+gPGZnzDf4pXClzr7TX7EmcZsiqipYG4mEnX ebiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729275920; x=1729880720; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f4rXhcsu75RQ6qJ8BqPK5pJGFSBb9OK02xFD1ELB+RE=; b=Cupr1rIy+Fkaa8p2BNHd3NC6vlfJn/xvx94Ptt08WY1V0Sw3muJVt7xlQ4mNnVFOUs Qh/uRG2lb1Z1jpDGiABRuH79Ex+Ic0KyBUXnAsf1zGfA+mYEsO75sHDcezWYPYaCaMFW b4pOtkGuyG/9Vr60n79lADWFF5D0ONySr6yWNGwUP2cl5SfxhVIgSkoHY8hvSrKjaXK/ wYXGr1AVM7JtO+pqAnPXaAZW5kBlFKP/64l7Pyf9ekudQMH2T6Z9807X4AAS+JmDlMiZ 8nQs3SmnQlM5f/qleDZ5PqlxnugsvKE7UhW1Pz+l0iH1DZaJVpgoi2Yh4LRKJMcigQgv gvwA== X-Gm-Message-State: AOJu0Yzieru8mFxkhcHSUQrlE8/rqAo5u5csUNL4KR8EyG7XRIyXXX9v Ehnda9w34QZBnWCRh+PcgX/3ObOAiLJIGQqoUD0RhLkecHlZMOuCBBtDgCmoTtKm8hsIA7bdLUP f5OP9sg== X-Google-Smtp-Source: AGHT+IHNTFlA64Z7438lRC4Dm5QySlOViy66H5y9G5fD6p1xhtovSIoPEcjgIUAUeUvLJ1AcJXa4EQ== X-Received: by 2002:a17:902:db04:b0:20e:5997:c107 with SMTP id d9443c01a7336-20e5a8fb320mr45380465ad.39.1729275919607; Fri, 18 Oct 2024 11:25:19 -0700 (PDT) Received: from localhost.localdomain ([118.114.60.204]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e5a8f2034sm15668475ad.193.2024.10.18.11.25.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 11:25:19 -0700 (PDT) From: Hyman Huang To: qemu-devel@nongnu.org Cc: Peter Xu , Fabiano Rosas , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , yong.huang@smartx.com Subject: [PATCH v2 3/5] guestperf: Support deferred migration for multifd Date: Sat, 19 Oct 2024 02:25:05 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The way to enable multifd migration has been changed by commit, 82137e6c8c (migration: enforce multifd and postcopy preempt to be set before incoming), and guestperf has not made the necessary changes. If multifd migration had been enabled in the previous manner, the following error would have occurred: Multifd must be set before incoming starts Supporting deferred migration will fix it. Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrangé --- scripts/migration/guestperf/engine.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/migration/guestperf/engine.py b/scripts/migration/guestperf/engine.py index 608d7270f6..4b15322e8d 100644 --- a/scripts/migration/guestperf/engine.py +++ b/scripts/migration/guestperf/engine.py @@ -106,7 +106,8 @@ def _migrate_progress(self, vm): info.get("dirty-limit-ring-full-time", 0), ) - def _migrate(self, hardware, scenario, src, dst, connect_uri): + def _migrate(self, hardware, scenario, src, + dst, connect_uri, defer_migrate): src_qemu_time = [] src_vcpu_time = [] src_pid = src.get_pid() @@ -220,6 +221,8 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): resp = src.cmd("migrate-set-parameters", vcpu_dirty_limit=scenario._vcpu_dirty_limit) + if defer_migrate: + resp = dst.cmd("migrate-incoming", uri=connect_uri) resp = src.cmd("migrate", uri=connect_uri) post_copy = False @@ -373,11 +376,14 @@ def _get_common_args(self, hardware, tunnelled=False): def _get_src_args(self, hardware): return self._get_common_args(hardware) - def _get_dst_args(self, hardware, uri): + def _get_dst_args(self, hardware, uri, defer_migrate): tunnelled = False if self._dst_host != "localhost": tunnelled = True argv = self._get_common_args(hardware, tunnelled) + + if defer_migrate: + return argv + ["-incoming", "defer"] return argv + ["-incoming", uri] @staticmethod @@ -424,6 +430,7 @@ def _get_timings(self, vm): def run(self, hardware, scenario, result_dir=os.getcwd()): abs_result_dir = os.path.join(result_dir, scenario._name) + defer_migrate = False if self._transport == "tcp": uri = "tcp:%s:9000" % self._dst_host @@ -439,6 +446,9 @@ def run(self, hardware, scenario, result_dir=os.getcwd()): except: pass + if scenario._multifd: + defer_migrate = True + if self._dst_host != "localhost": dstmonaddr = ("localhost", 9001) else: @@ -452,7 +462,7 @@ def run(self, hardware, scenario, result_dir=os.getcwd()): monitor_address=srcmonaddr) dst = QEMUMachine(self._binary, - args=self._get_dst_args(hardware, uri), + args=self._get_dst_args(hardware, uri, defer_migrate), wrapper=self._get_dst_wrapper(hardware), name="qemu-dst-%d" % os.getpid(), monitor_address=dstmonaddr) @@ -461,7 +471,8 @@ def run(self, hardware, scenario, result_dir=os.getcwd()): src.launch() dst.launch() - ret = self._migrate(hardware, scenario, src, dst, uri) + ret = self._migrate(hardware, scenario, src, + dst, uri, defer_migrate) progress_history = ret[0] qemu_timings = ret[1] vcpu_timings = ret[2] From patchwork Fri Oct 18 18:25:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yong Huang X-Patchwork-Id: 1999342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=ekRb/YkX; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XVY7q18gTz1xwD for ; Sat, 19 Oct 2024 05:26:47 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1rfG-0005R9-73; Fri, 18 Oct 2024 14:25:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1rfB-0005Pn-VA for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:25 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1rfA-0001zx-HW for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:25 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-20ca1b6a80aso22743355ad.2 for ; Fri, 18 Oct 2024 11:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1729275922; x=1729880722; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+aJGEOCEmzftCukQzy9/QugNmX9x51GzbaO0ef3BSb8=; b=ekRb/YkXCBOYRuQIEPKVE25k6kj6iA4aLvYCZkMsF2IGkrd6ftRiHfR5RfbPFSIC6q pavDfd9An0pCTQOKc9az5PhwAp6+KoYW/YUv/30k8dQoTfNsd59XzKdpuf4ht+yXFf5V GQCH938BRB5/Qz8SxBGj8BLF5tJzm7+7Eg30PmC15GtDWprGH9rtydRwJwrQlG6exphp Kp9VngAQZG68bcYaqwbeO7/QPq7R9DF4pEU6YHcr0IfO2Hpo/arWDwG1/W/UxZOkNmQ6 aJ5EK16vpO3CtGhL50Lyi8hI3/biIk8Vqv7tOhmbXsS+PoXiuLRcz3khpYyFSvZ9EnWT aPPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729275922; x=1729880722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+aJGEOCEmzftCukQzy9/QugNmX9x51GzbaO0ef3BSb8=; b=ElmMB+fTStQ3H8UVK9oyP5lejkZVcIDitr9FD9hw51uLlsATPUsSk8Sq3UF/5xC+Zo aYJ2koU+M6puvjoEO0xB4PQf/vc90SmNRucCgl/J8JuBOsvjNWgZNEUPFFEBMVJzAJYi Z/hJYMOWn7zagZB8+Haw0E8szILptY9QPHqrTraR1dEkcCE6TOKvwplxLSDLLo+4Ryp3 +F8a8T8csdUvXeQLCdvxJ6uFnI8QKb7ngTNhGjKYdjTpSrzLJMgbZoMEYhHk95yHWGzj R54k9xYrCzwVbfWArtXwmeJTwLGlJHKPgGivvGjaUFHaJmycgtmoW7NCj0g0APDo6NRf kw9A== X-Gm-Message-State: AOJu0YwqrAC9KQlBRRPDO7dSjZl/tCj8BS8R3zryWHzJvUmKSbffab6X DqpGgl7LJk0GPRF5c2ViqEXpXZMpqVKTDaS8Foa2Dq99ZIoN5YzLmAqvfU+xAZ4yua15sXNAT2b 8iPYSNA== X-Google-Smtp-Source: AGHT+IEyzg/IBhpE2BoUdMYWZSGVK14EpHv2WOES449F0//UiavNLmPFoljnMxmOZ8NNWma8D1/tmg== X-Received: by 2002:a17:902:cec5:b0:20c:890c:2f76 with SMTP id d9443c01a7336-20e5a779011mr46193985ad.16.1729275921937; Fri, 18 Oct 2024 11:25:21 -0700 (PDT) Received: from localhost.localdomain ([118.114.60.204]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e5a8f2034sm15668475ad.193.2024.10.18.11.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 11:25:21 -0700 (PDT) From: Hyman Huang To: qemu-devel@nongnu.org Cc: Peter Xu , Fabiano Rosas , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , yong.huang@smartx.com Subject: [PATCH v2 4/5] guestperf: Nitpick the inconsistent parameters Date: Sat, 19 Oct 2024 02:25:06 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x636.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Hyman Huang Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé --- scripts/migration/guestperf/comparison.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/migration/guestperf/comparison.py b/scripts/migration/guestperf/comparison.py index 42cc0372d1..40e9d2eb1d 100644 --- a/scripts/migration/guestperf/comparison.py +++ b/scripts/migration/guestperf/comparison.py @@ -127,7 +127,7 @@ def __init__(self, name, scenarios): # varying numbers of channels Comparison("compr-multifd", scenarios = [ Scenario("compr-multifd-channels-4", - multifd=True, multifd_channels=2), + multifd=True, multifd_channels=4), Scenario("compr-multifd-channels-8", multifd=True, multifd_channels=8), Scenario("compr-multifd-channels-32", From patchwork Fri Oct 18 18:25:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yong Huang X-Patchwork-Id: 1999339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=smartx-com.20230601.gappssmtp.com header.i=@smartx-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=J+ZU2wrm; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XVY7X0VHKz1xw2 for ; Sat, 19 Oct 2024 05:26:32 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1rfG-0005RC-MB; Fri, 18 Oct 2024 14:25:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1rfE-0005Qk-Gk for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:29 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1rfC-00020H-IR for qemu-devel@nongnu.org; Fri, 18 Oct 2024 14:25:28 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-208cf673b8dso25381985ad.3 for ; Fri, 18 Oct 2024 11:25:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1729275925; x=1729880725; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SP7lJo4YH4pDm5n05L8kP6pYJyaFJ601AndjXi5kl1A=; b=J+ZU2wrmrV21xsmXScvSm1HMCH75v+seVe3QvGp1fcIUShT+Zj99jHxQwPa5ysYzuv PuoDDBt4CMHVWiM7qQu6iCcLOxu5qkFnSrJWbQw7b2pNrMKhMJYcdgoiZabjmA+U7eTW Ydv93XvZPqy81qgyHHb9tv1hZyYE7LG2CyZE7WL8jP348dC7CUqQ5g/NCFzUNI5QDzz9 CLF0Z28fea4q3n1z5IuPZdMcQS0+lYywYC2o411C7dZfQcscP91UGHBalo0b886Lr+eU Cc+EOfZO1pyekE+qVqP+tglfQBp5ukeepxP7fDmXbrKE/velhaFDRZ8vvxgB9qijnWTp tODQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729275925; x=1729880725; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SP7lJo4YH4pDm5n05L8kP6pYJyaFJ601AndjXi5kl1A=; b=l5MyzBcJJPuxWdugX3lvPHKrzM2RN50oOnzcEEGe5zfsJoCj6MULywV74LyNr7Lqpt 4w7rWRHLSoSlBfwroa53h+49a2lx395GVr782cduCHbMbcmJMlV3SEloC3+Dpg78bZ8A w3v9UlJIWN4P1nbgUz7v89WPDHgfL63q4RLmjCqivR1mGoct4mNuhTaAulAPSmGmREda CyCplTU2cP3cb9iOMBA/cn1wir7onqmgBAqzVGxYFgce62bvlToyV6ve7sEDv11Ew2rg xLMIcTESOFSNeroHDmBmyDYnUH3poGmeOIlgLKapsb0rMtmhQ+UZK78jN+QVeLDNag90 CLvg== X-Gm-Message-State: AOJu0YzNnenI6eEdqBDvFuxrl/MoxylLqWp/LQoUMN+EQUKGuC829Fj6 n7qXJkZBhEWGwcQ4Krn+s483ejuNJXuvuVo17ytY4F4BMkJ9x8GLpAEHvFtmZWzXB7q4Ceb7Pad 4U/73Sw== X-Google-Smtp-Source: AGHT+IFHi/2CQT6h5npef1G4Jzx0utpPRqUSW1PI2lE5zR+kh4bQJwzv1sDppg61xLVc9wyHZGb3Ig== X-Received: by 2002:a17:903:1d0:b0:20c:7d29:7281 with SMTP id d9443c01a7336-20e5a925f5cmr34834635ad.52.1729275924287; Fri, 18 Oct 2024 11:25:24 -0700 (PDT) Received: from localhost.localdomain ([118.114.60.204]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e5a8f2034sm15668475ad.193.2024.10.18.11.25.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 11:25:24 -0700 (PDT) From: Hyman Huang To: qemu-devel@nongnu.org Cc: Peter Xu , Fabiano Rosas , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , yong.huang@smartx.com Subject: [PATCH v2 5/5] guestperf: Introduce multifd compression option Date: Sat, 19 Oct 2024 02:25:07 +0800 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=yong.huang@smartx.com; helo=mail-pl1-x634.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Guestperf tool does not cover the multifd compression option currently, it is worth supporting so that developers can analysis the migration performance with different compression algorithms. Multifd support 4 compression algorithms currently: zlib, zstd, qpl, uadk To request that multifd with the specified compression algorithm such as zlib: $ ./scripts/migration/guestperf.py \ --multifd --multifd-channels 4 --multifd-compression zlib \ --output output.json To run the entire standardized set of multifd compression comparisons, with unix migration: $ ./scripts/migration/guestperf-batch.py \ --dst-host localhost --transport unix \ --filter compr-multifd-compression* --output outputdir Signed-off-by: Hyman Huang Reviewed-by: Daniel P. Berrangé --- scripts/migration/guestperf/comparison.py | 13 +++++++++++++ scripts/migration/guestperf/engine.py | 14 ++++++++++++++ scripts/migration/guestperf/scenario.py | 7 +++++-- scripts/migration/guestperf/shell.py | 3 +++ 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/scripts/migration/guestperf/comparison.py b/scripts/migration/guestperf/comparison.py index 40e9d2eb1d..dee3ac25e4 100644 --- a/scripts/migration/guestperf/comparison.py +++ b/scripts/migration/guestperf/comparison.py @@ -158,4 +158,17 @@ def __init__(self, name, scenarios): Scenario("compr-dirty-limit-50MB", dirty_limit=True, vcpu_dirty_limit=50), ]), + + # Looking at effect of multifd with + # different compression algorithms + Comparison("compr-multifd-compression", scenarios = [ + Scenario("compr-multifd-compression-zlib", + multifd=True, multifd_channels=2, multifd_compression="zlib"), + Scenario("compr-multifd-compression-zstd", + multifd=True, multifd_channels=2, multifd_compression="zstd"), + Scenario("compr-multifd-compression-qpl", + multifd=True, multifd_channels=2, multifd_compression="qpl"), + Scenario("compr-multifd-compression-uadk", + multifd=True, multifd_channels=2, multifd_compression="uadk"), + ]), ] diff --git a/scripts/migration/guestperf/engine.py b/scripts/migration/guestperf/engine.py index 4b15322e8d..e11f6a8496 100644 --- a/scripts/migration/guestperf/engine.py +++ b/scripts/migration/guestperf/engine.py @@ -31,6 +31,8 @@ '..', '..', '..', 'python')) from qemu.machine import QEMUMachine +# multifd supported compression algorithms +MULTIFD_CMP_ALGS = ("zlib", "zstd", "qpl", "uadk") class Engine(object): @@ -191,6 +193,12 @@ def _migrate(self, hardware, scenario, src, scenario._compression_xbzrle_cache)) if scenario._multifd: + if (scenario._multifd_compression and + (scenario._multifd_compression not in MULTIFD_CMP_ALGS)): + raise Exception("unsupported multifd compression " + "algorithm: %s" % + scenario._multifd_compression) + resp = src.cmd("migrate-set-capabilities", capabilities = [ { "capability": "multifd", @@ -206,6 +214,12 @@ def _migrate(self, hardware, scenario, src, resp = dst.cmd("migrate-set-parameters", multifd_channels=scenario._multifd_channels) + if scenario._multifd_compression: + resp = src.cmd("migrate-set-parameters", + multifd_compression=scenario._multifd_compression) + resp = dst.cmd("migrate-set-parameters", + multifd_compression=scenario._multifd_compression) + if scenario._dirty_limit: if not hardware._dirty_ring_size: raise Exception("dirty ring size must be configured when " diff --git a/scripts/migration/guestperf/scenario.py b/scripts/migration/guestperf/scenario.py index 154c4f5d5f..4be7fafebf 100644 --- a/scripts/migration/guestperf/scenario.py +++ b/scripts/migration/guestperf/scenario.py @@ -30,7 +30,7 @@ def __init__(self, name, auto_converge=False, auto_converge_step=10, compression_mt=False, compression_mt_threads=1, compression_xbzrle=False, compression_xbzrle_cache=10, - multifd=False, multifd_channels=2, + multifd=False, multifd_channels=2, multifd_compression="", dirty_limit=False, x_vcpu_dirty_limit_period=500, vcpu_dirty_limit=1): @@ -61,6 +61,7 @@ def __init__(self, name, self._multifd = multifd self._multifd_channels = multifd_channels + self._multifd_compression = multifd_compression self._dirty_limit = dirty_limit self._x_vcpu_dirty_limit_period = x_vcpu_dirty_limit_period @@ -85,6 +86,7 @@ def serialize(self): "compression_xbzrle_cache": self._compression_xbzrle_cache, "multifd": self._multifd, "multifd_channels": self._multifd_channels, + "multifd_compression": self._multifd_compression, "dirty_limit": self._dirty_limit, "x_vcpu_dirty_limit_period": self._x_vcpu_dirty_limit_period, "vcpu_dirty_limit": self._vcpu_dirty_limit, @@ -109,4 +111,5 @@ def deserialize(cls, data): data["compression_xbzrle"], data["compression_xbzrle_cache"], data["multifd"], - data["multifd_channels"]) + data["multifd_channels"], + data["multifd_compression"]) diff --git a/scripts/migration/guestperf/shell.py b/scripts/migration/guestperf/shell.py index c85d89efec..1452eb8a33 100644 --- a/scripts/migration/guestperf/shell.py +++ b/scripts/migration/guestperf/shell.py @@ -130,6 +130,8 @@ def __init__(self): action="store_true") parser.add_argument("--multifd-channels", dest="multifd_channels", default=2, type=int) + parser.add_argument("--multifd-compression", dest="multifd_compression", + default="") parser.add_argument("--dirty-limit", dest="dirty_limit", default=False, action="store_true") @@ -166,6 +168,7 @@ def get_scenario(self, args): multifd=args.multifd, multifd_channels=args.multifd_channels, + multifd_compression=args.multifd_compression, dirty_limit=args.dirty_limit, x_vcpu_dirty_limit_period=\