From 0d318453645db4ff9dfa021642cee37c2046224a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 8 Nov 2022 16:20:20 +0100 Subject: [PATCH] change cpu shares: drop superfluous parameter See the related commit in pve-common. Originally-by: Fiona Ebner Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 1cedcef5..bfd31da0 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4882,7 +4882,7 @@ sub vmconfig_hotplug_pending { die "skip\n" if !$hotplug_features->{memory}; PVE::QemuServer::Memory::qemu_memory_hotplug($vmid, $conf, $defaults, $opt); } elsif ($opt eq 'cpuunits') { - $cgroup->change_cpu_shares(undef, 1024); + $cgroup->change_cpu_shares(undef); } elsif ($opt eq 'cpulimit') { $cgroup->change_cpu_quota(undef, undef); # reset, cgroup module can better decide values } else { @@ -4977,7 +4977,7 @@ sub vmconfig_hotplug_pending { $value = PVE::QemuServer::Memory::qemu_memory_hotplug($vmid, $conf, $defaults, $opt, $value); } elsif ($opt eq 'cpuunits') { my $new_cpuunits = PVE::CGroup::clamp_cpu_shares($conf->{pending}->{$opt}); #clamp - $cgroup->change_cpu_shares($new_cpuunits, 1024); + $cgroup->change_cpu_shares($new_cpuunits); } elsif ($opt eq 'cpulimit') { my $cpulimit = $conf->{pending}->{$opt} == 0 ? -1 : int($conf->{pending}->{$opt} * 100000); $cgroup->change_cpu_quota($cpulimit, 100000);