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

This commit is contained in:
Alex Zenla
2024-06-29 21:30:06 -07:00
parent a79320b4fc
commit e6d9b2e3c7
2 changed files with 7 additions and 3 deletions

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.