CPU pinning page: make cores/threads calculation consistent

This commit is contained in:
bergware
2018-08-11 15:32:55 +02:00
parent 530c870426
commit b8dad50631
+1 -1
View File
@@ -37,7 +37,7 @@ case 'vm':
$ht = exec("lscpu|grep -Po '^Thread\\(s\\) per core:\\s+\\K\\d+'") ?: 1; // fetch hyperthreading
}
// adjust for hyperthreading
if ($vcpus > $ht && !$vcpus%$ht) {
if ($vcpus > $ht && $vcpus%$ht===0) {
$cores /= $ht;
$threads = $ht;
}