From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 0D2271FF15E for <inbox@lore.proxmox.com>; Tue, 11 Mar 2025 14:21:36 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2A4DA106D8; Tue, 11 Mar 2025 14:21:03 +0100 (CET) From: Dominik Csapak <d.csapak@proxmox.com> To: pve-devel@lists.proxmox.com Date: Tue, 11 Mar 2025 14:20:48 +0100 Message-Id: <20250311132055.2826686-11-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250311132055.2826686-1-d.csapak@proxmox.com> References: <20250311132055.2826686-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.023 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu-server v7 8/9] migrate: show vfio state transferred too X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> Show the transferred VFIO state (when there is one), but since there is no total here, so we can't show that, just what was transferred up until now. Reviewed-by: Christoph Heiss <c.heiss@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> --- changes from v6: * removed unrelated hunk (added in the previous patch) PVE/QemuMigrate.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 6909fc82..d6f9132b 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -1241,6 +1241,7 @@ sub phase2 { $self->log('info', "migrate uri => $migrate_uri failed: $merr") if $merr; my $last_mem_transferred = 0; + my $last_vfio_transferred = 0; my $usleep = 1000000; my $i = 0; my $err_count = 0; @@ -1300,8 +1301,11 @@ sub phase2 { last; } - if ($memstat->{transferred} ne $last_mem_transferred) { + if ($memstat->{transferred} ne $last_mem_transferred || + $stat->{vfio}->{transferred} ne $last_vfio_transferred + ) { my $trans = $memstat->{transferred} || 0; + my $vfio_transferred = $stat->{vfio}->{transferred} || 0; my $rem = $memstat->{remaining} || 0; my $total = $memstat->{total} || 0; my $speed = ($memstat->{'pages-per-second'} // 0) * ($memstat->{'page-size'} // 0); @@ -1319,6 +1323,11 @@ sub phase2 { my $progress = "transferred $transferred_h of $total_h VM-state, ${speed_h}/s"; + if ($vfio_transferred > 0) { + my $vfio_h = render_bytes($vfio_transferred, 1); + $progress .= " (+ $vfio_h VFIO-state)"; + } + if ($dirty_rate > $speed) { my $dirty_rate_h = render_bytes($dirty_rate, 1); $progress .= ", VM dirties lots of memory: $dirty_rate_h/s"; @@ -1360,6 +1369,7 @@ sub phase2 { } $last_mem_transferred = $memstat->{transferred}; + $last_vfio_transferred = $stat->{vfio}->{transferred}; } if ($self->{storage_migration}) { -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel