public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] pvestatd: fix rebalancing cpusets for cgroupv2
@ 2021-10-14  6:51 Oguz Bektas
  2021-10-19 12:01 ` Aaron Lauterer
  0 siblings, 1 reply; 3+ messages in thread
From: Oguz Bektas @ 2021-10-14  6:51 UTC (permalink / raw)
  To: pve-devel

currently we only check the entry for cgroup v1 to decide if cores
should be rebalanced. extend the check to include cgroup v2 entries.

reported in forum [0]

[0]: https://forum.proxmox.com/threads/hard-set-streams-for-lxc-container.97768/

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 PVE/Service/pvestatd.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index 7193388c..26d96bb2 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -343,8 +343,9 @@ sub rebalance_lxc_containers {
 
 	my @cpuset_members = $cpuset->members();
 
-	if (!PVE::LXC::Config->has_lxc_entry($conf, 'lxc.cgroup.cpuset.cpus')) {
-
+	if (!PVE::LXC::Config->has_lxc_entry($conf, 'lxc.cgroup.cpuset.cpus')
+	    && !PVE::LXC::Config->has_lxc_entry($conf, 'lxc.cgroup2.cpuset.cpus')
+	) {
 	    my $cores = $conf->{cores} || $cpucount;
 	    $cores = $cpucount if $cores > $cpucount;
 
-- 
2.30.2





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

end of thread, other threads:[~2021-10-20 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14  6:51 [pve-devel] [PATCH manager] pvestatd: fix rebalancing cpusets for cgroupv2 Oguz Bektas
2021-10-19 12:01 ` Aaron Lauterer
2021-10-20 14:47   ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal