all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm
@ 2021-10-12 11:20 Dominik Csapak
  2021-10-21  9:53 ` Oguz Bektas
  2021-10-22 10:04 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 7+ messages in thread
From: Dominik Csapak @ 2021-10-12 11:20 UTC (permalink / raw)
  To: pve-devel

like in pve-container:
04a62bd ("fix #3506: config: fix removing the cpulimit of a running CT")

reported in the forums (no bug# yet):
https://forum.proxmox.com/threads/issue-with-removing-cpu-limit-from-running-vm.97799/

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index eb29fc2..1d31d02 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4754,7 +4754,7 @@ sub vmconfig_hotplug_pending {
 	    } elsif ($opt eq 'cpuunits') {
 		$cgroup->change_cpu_shares(undef, 1024);
 	    } elsif ($opt eq 'cpulimit') {
-		$cgroup->change_cpu_quota(-1, 100000);
+		$cgroup->change_cpu_quota(undef, undef); # reset, cgroup module can better decide values
 	    } else {
 		die "skip\n";
 	    }
-- 
2.30.2





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm
  2021-10-12 11:20 [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm Dominik Csapak
@ 2021-10-21  9:53 ` Oguz Bektas
  2021-10-21 10:51   ` Dominik Csapak
  2021-10-22 10:04 ` [pve-devel] applied: " Thomas Lamprecht
  1 sibling, 1 reply; 7+ messages in thread
From: Oguz Bektas @ 2021-10-21  9:53 UTC (permalink / raw)
  To: Proxmox VE development discussion

hi,

works for cgroupv2 but with 'systemd.unified_cgroup_hierarchy=0' in
cmdline it errors:


====
update VM 101: -delete cpulimit
400 Parameter verification failed.
cpulimit: hotplug problem - closing file
'/sys/fs/cgroup/cpu/qemu.slice/101.scope//cpu.cfs_period_us' failed -
Invalid argument
====


On Tue, Oct 12, 2021 at 01:20:52PM +0200, Dominik Csapak wrote:
> like in pve-container:
> 04a62bd ("fix #3506: config: fix removing the cpulimit of a running CT")
> 
> reported in the forums (no bug# yet):
> https://forum.proxmox.com/threads/issue-with-removing-cpu-limit-from-running-vm.97799/
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index eb29fc2..1d31d02 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -4754,7 +4754,7 @@ sub vmconfig_hotplug_pending {
>  	    } elsif ($opt eq 'cpuunits') {
>  		$cgroup->change_cpu_shares(undef, 1024);
>  	    } elsif ($opt eq 'cpulimit') {
> -		$cgroup->change_cpu_quota(-1, 100000);
> +		$cgroup->change_cpu_quota(undef, undef); # reset, cgroup module can better decide values
>  	    } else {
>  		die "skip\n";
>  	    }
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm
  2021-10-21  9:53 ` Oguz Bektas
@ 2021-10-21 10:51   ` Dominik Csapak
  2021-10-21 11:43     ` Oguz Bektas
  0 siblings, 1 reply; 7+ messages in thread
From: Dominik Csapak @ 2021-10-21 10:51 UTC (permalink / raw)
  To: Oguz Bektas, Proxmox VE development discussion

On 10/21/21 11:53, Oguz Bektas wrote:
> hi,
> 
> works for cgroupv2 but with 'systemd.unified_cgroup_hierarchy=0' in
> cmdline it errors:
> 
> 
> ====
> update VM 101: -delete cpulimit
> 400 Parameter verification failed.
> cpulimit: hotplug problem - closing file
> '/sys/fs/cgroup/cpu/qemu.slice/101.scope//cpu.cfs_period_us' failed -
> Invalid argument
> ====
> 
> 

hm... does this work for running containers? since we use the
exact same code there for cpulimit...

> On Tue, Oct 12, 2021 at 01:20:52PM +0200, Dominik Csapak wrote:
>> like in pve-container:
>> 04a62bd ("fix #3506: config: fix removing the cpulimit of a running CT")
>>
>> reported in the forums (no bug# yet):
>> https://forum.proxmox.com/threads/issue-with-removing-cpu-limit-from-running-vm.97799/
>>
>> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
>> ---
>>   PVE/QemuServer.pm | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
>> index eb29fc2..1d31d02 100644
>> --- a/PVE/QemuServer.pm
>> +++ b/PVE/QemuServer.pm
>> @@ -4754,7 +4754,7 @@ sub vmconfig_hotplug_pending {
>>   	    } elsif ($opt eq 'cpuunits') {
>>   		$cgroup->change_cpu_shares(undef, 1024);
>>   	    } elsif ($opt eq 'cpulimit') {
>> -		$cgroup->change_cpu_quota(-1, 100000);
>> +		$cgroup->change_cpu_quota(undef, undef); # reset, cgroup module can better decide values
>>   	    } else {
>>   		die "skip\n";
>>   	    }
>> -- 
>> 2.30.2
>>
>>
>>
>> _______________________________________________
>> pve-devel mailing list
>> pve-devel@lists.proxmox.com
>> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>>
>>
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm
  2021-10-21 10:51   ` Dominik Csapak
@ 2021-10-21 11:43     ` Oguz Bektas
  2021-10-21 14:21       ` Dominik Csapak
  0 siblings, 1 reply; 7+ messages in thread
From: Oguz Bektas @ 2021-10-21 11:43 UTC (permalink / raw)
  To: Dominik Csapak; +Cc: Proxmox VE development discussion

On Thu, Oct 21, 2021 at 12:51:43PM +0200, Dominik Csapak wrote:
> On 10/21/21 11:53, Oguz Bektas wrote:
> > hi,
> > 
> > works for cgroupv2 but with 'systemd.unified_cgroup_hierarchy=0' in
> > cmdline it errors:
> > 
> > 
> > ====
> > update VM 101: -delete cpulimit
> > 400 Parameter verification failed.
> > cpulimit: hotplug problem - closing file
> > '/sys/fs/cgroup/cpu/qemu.slice/101.scope//cpu.cfs_period_us' failed -
> > Invalid argument
> > ====
> > 
> > 
> 
> hm... does this work for running containers? since we use the
> exact same code there for cpulimit...

apparently doesn't work there either




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm
  2021-10-21 11:43     ` Oguz Bektas
@ 2021-10-21 14:21       ` Dominik Csapak
  2021-10-21 14:51         ` Oguz Bektas
  0 siblings, 1 reply; 7+ messages in thread
From: Dominik Csapak @ 2021-10-21 14:21 UTC (permalink / raw)
  To: Oguz Bektas, Proxmox VE development discussion

On 10/21/21 13:43, Oguz Bektas wrote:
> On Thu, Oct 21, 2021 at 12:51:43PM +0200, Dominik Csapak wrote:
>> On 10/21/21 11:53, Oguz Bektas wrote:
>>> hi,
>>>
>>> works for cgroupv2 but with 'systemd.unified_cgroup_hierarchy=0' in
>>> cmdline it errors:
>>>
>>>
>>> ====
>>> update VM 101: -delete cpulimit
>>> 400 Parameter verification failed.
>>> cpulimit: hotplug problem - closing file
>>> '/sys/fs/cgroup/cpu/qemu.slice/101.scope//cpu.cfs_period_us' failed -
>>> Invalid argument
>>> ====
>>>
>>>
>>
>> hm... does this work for running containers? since we use the
>> exact same code there for cpulimit...
> 
> apparently doesn't work there either
> 

ok i guess then we should fix it in pve-common and keep this patch as is?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm
  2021-10-21 14:21       ` Dominik Csapak
@ 2021-10-21 14:51         ` Oguz Bektas
  0 siblings, 0 replies; 7+ messages in thread
From: Oguz Bektas @ 2021-10-21 14:51 UTC (permalink / raw)
  To: Dominik Csapak; +Cc: Proxmox VE development discussion

On Thu, Oct 21, 2021 at 04:21:12PM +0200, Dominik Csapak wrote:
> On 10/21/21 13:43, Oguz Bektas wrote:
> > On Thu, Oct 21, 2021 at 12:51:43PM +0200, Dominik Csapak wrote:
> > > On 10/21/21 11:53, Oguz Bektas wrote:
> > > > hi,
> > > > 
> > > > works for cgroupv2 but with 'systemd.unified_cgroup_hierarchy=0' in
> > > > cmdline it errors:
> > > > 
> > > > 
> > > > ====
> > > > update VM 101: -delete cpulimit
> > > > 400 Parameter verification failed.
> > > > cpulimit: hotplug problem - closing file
> > > > '/sys/fs/cgroup/cpu/qemu.slice/101.scope//cpu.cfs_period_us' failed -
> > > > Invalid argument
> > > > ====
> > > > 
> > > > 
> > > 
> > > hm... does this work for running containers? since we use the
> > > exact same code there for cpulimit...
> > 
> > apparently doesn't work there either
> > 
> 
> ok i guess then we should fix it in pve-common and keep this patch as is?
> 
yep i've sent patch for pve-common now, with that applied your fix works

Tested-by: Oguz Bektas <o.bektas@proxmox.com>
Reviewed-by: Oguz Bektas <o.bektas@proxmox.com>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] fix removing cpulimit on running vm
  2021-10-12 11:20 [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm Dominik Csapak
  2021-10-21  9:53 ` Oguz Bektas
@ 2021-10-22 10:04 ` Thomas Lamprecht
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Lamprecht @ 2021-10-22 10:04 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

On 12/10/2021 13:20, Dominik Csapak wrote:
> like in pve-container:
> 04a62bd ("fix #3506: config: fix removing the cpulimit of a running CT")
> 
> reported in the forums (no bug# yet):
> https://forum.proxmox.com/threads/issue-with-removing-cpu-limit-from-running-vm.97799/
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied with Oğuz R-b and T-b and a note that Oğuz patch in pve-common is also
required as without that one it'll break CGv1, thanks to both!




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-22 10:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 11:20 [pve-devel] [PATCH qemu-server] fix removing cpulimit on running vm Dominik Csapak
2021-10-21  9:53 ` Oguz Bektas
2021-10-21 10:51   ` Dominik Csapak
2021-10-21 11:43     ` Oguz Bektas
2021-10-21 14:21       ` Dominik Csapak
2021-10-21 14:51         ` Oguz Bektas
2021-10-22 10:04 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal