mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-21 16:02:03 +00:00
migrate: show vfio state transferred too
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. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Reviewed-by: Christoph Heiss <c.heiss@proxmox.com> Reviewed-by: Fiona Ebner <f.ebner@proxmox.com> Tested-by: Christoph Heiss <c.heiss@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8aeaad24ab
commit
09f8d3f19e
@ -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}) {
|
||||
|
Loading…
Reference in New Issue
Block a user