From: Wolfgang Bumiller Date: Wed, 9 Mar 2016 09:01:14 +0000 (+0100) Subject: implement cpulimit hotplugging X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=213d70e61818de15c5a6d1cd068b4c960336fcd0;p=pve-container.git implement cpulimit hotplugging --- diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 04ce9ef..7c451ba 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -733,7 +733,7 @@ sub update_pct_config { next if $hotplug_error->($opt); delete $conf->{$opt}; } elsif ($opt eq 'cpulimit') { - next if $hotplug_error->($opt); # FIXME: hotplug + PVE::LXC::write_cgroup_value("cpu", $vmid, "cpu.cfs_quota_us", -1); delete $conf->{$opt}; } elsif ($opt eq 'cpuunits') { PVE::LXC::write_cgroup_value("cpu", $vmid, "cpu.shares", $confdesc->{cpuunits}->{default}); @@ -827,7 +827,7 @@ sub update_pct_config { my $list = PVE::LXC::verify_searchdomain_list($value); $conf->{$opt} = $list; } elsif ($opt eq 'cpulimit') { - next if $hotplug_error->($opt); # FIXME: hotplug + PVE::LXC::write_cgroup_value("cpu", $vmid, "cpu.cfs_quota_us", int(100000*$value)); $conf->{$opt} = $value; } elsif ($opt eq 'cpuunits') { $conf->{$opt} = $value;