fix(power): ensure that xeon cpus with cpu gaps are not detected as p/e compatible (#218)

This commit is contained in:
alex authored and GitHub committed 2024-06-30 05:25:15 +00:00
1 parent a79320b4fc
commit 35d585e3b1
2 files changed
+7 -3

No files matched your search

+6 -1
View File
@@ -47,7 +47,12 @@ fn labelled_topo(input: &[SysctlCputopo]) -> Vec<CpuTopologyInfo> {
}
if last
.map(|last| (item.core - last.core) >= 2)
.map(|last| {
item.core
.checked_sub(last.core)
.map(|diff| diff >= 3)
.unwrap_or(false)
})
.unwrap_or(false)
{
// detect if performance cores seem to be kicking in.