]> git.proxmox.com Git - pve-manager.git/commitdiff
use new CpuSet::max_cpuid() helper
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 28 Oct 2016 15:50:13 +0000 (17:50 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 28 Oct 2016 15:51:59 +0000 (17:51 +0200)
PVE/Service/pvestatd.pm

index 44ad020dd487fee14ee35422bc78a4aadc0f8f7e..377483341b9b5ade17a0458b5b64b855f2529107 100755 (executable)
@@ -229,8 +229,9 @@ sub rebalance_lxc_containers {
     my $all_cpus = PVE::CpuSet->new_from_cgroup('lxc', 'effective_cpus');
     my @allowed_cpus = $all_cpus->members();
     my $cpucount = scalar(@allowed_cpus);
+    my $max_cpuid = PVE::CpuSet::max_cpuid();
 
-    my @cpu_ctcount = (0) x $PVE::CpuSet::MAX_CPUID;
+    my @cpu_ctcount = (0) x $max_cpuid;
     my @balanced_cts;
 
     my $ctlist = PVE::LXC::config_list();
@@ -288,7 +289,7 @@ sub rebalance_lxc_containers {
        }
 
        foreach my $cpu (@cpuset_members) {
-           $cpu_ctcount[$cpu]++ if $cpu <= $PVE::CpuSet::MAX_CPUID;
+           $cpu_ctcount[$cpu]++ if $cpu <= $max_cpuid;
        }
     }