[pve-devel] [PATCH qemu-server 5/5] qmp: use query-cpus-fast for hotplug
Stefan Reiter
s.reiter at proxmox.com
Thu Feb 6 10:53:55 CET 2020
query-cpus has been deprecated since 2.12.0 [0] in favor of
query-cpus-fast, which no longer incurs a guest performance penalty on
the guest. The returned information is the same as far as our use case
is concerned.
[0] https://qemu.weilnetz.de/doc/qemu-doc.html#Deprecated-features
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
PVE/QemuServer.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 0c1bd6d..abb0528 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4504,7 +4504,7 @@ sub qemu_cpu_hotplug {
my $retry = 0;
my $currentrunningvcpus = undef;
while (1) {
- $currentrunningvcpus = mon_cmd($vmid, "query-cpus");
+ $currentrunningvcpus = mon_cmd($vmid, "query-cpus-fast");
last if scalar(@{$currentrunningvcpus}) == $i-1;
raise_param_exc({ vcpus => "error unplugging cpu$i" }) if $retry > 5;
$retry++;
@@ -4521,7 +4521,7 @@ sub qemu_cpu_hotplug {
return;
}
- my $currentrunningvcpus = mon_cmd($vmid, "query-cpus");
+ my $currentrunningvcpus = mon_cmd($vmid, "query-cpus-fast");
die "vcpus in running vm does not match its configuration\n"
if scalar(@{$currentrunningvcpus}) != $currentvcpus;
@@ -4534,7 +4534,7 @@ sub qemu_cpu_hotplug {
my $retry = 0;
my $currentrunningvcpus = undef;
while (1) {
- $currentrunningvcpus = mon_cmd($vmid, "query-cpus");
+ $currentrunningvcpus = mon_cmd($vmid, "query-cpus-fast");
last if scalar(@{$currentrunningvcpus}) == $i;
raise_param_exc({ vcpus => "error hotplugging cpu$i" }) if $retry > 10;
sleep 1;
--
2.20.1
More information about the pve-devel
mailing list