[pve-devel] [RFC container 6/7] change cpu shares: drop superfluous parameter

Fiona Ebner f.ebner at proxmox.com
Fri Oct 7 14:41:46 CEST 2022


See the related commit in pve-common.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 src/PVE/LXC/Config.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 4b3ccf5..fc654e6 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -1345,7 +1345,7 @@ sub vmconfig_hotplug_pending {
 	    } elsif ($opt eq 'cpulimit') {
 		$cgroup->change_cpu_quota(undef, undef); # reset, cgroup module can better decide values
 	    } elsif ($opt eq 'cpuunits') {
-		$cgroup->change_cpu_shares(undef, 1024);
+		$cgroup->change_cpu_shares(undef);
 	    } elsif ($opt =~ m/^net(\d)$/) {
 		my $netid = $1;
 		PVE::Network::veth_delete("veth${vmid}i$netid");
@@ -1370,7 +1370,7 @@ sub vmconfig_hotplug_pending {
 		my $quota = 100000 * $value;
 		$cgroup->change_cpu_quota(int(100000 * $value), 100000);
 	    } elsif ($opt eq 'cpuunits') {
-		$cgroup->change_cpu_shares($value, 1024);
+		$cgroup->change_cpu_shares($value);
 	    } elsif ($opt =~ m/^net(\d+)$/) {
 		my $netid = $1;
 		my $net = $class->parse_lxc_network($value);
-- 
2.30.2






More information about the pve-devel mailing list