Skip to content

Commit

Permalink
cpuallocator: don't filter based on single CoreKind.
Browse files Browse the repository at this point in the history
Only do CoreKind filtering in clustered allocation when we have
multiple CoreKinds available, IOW on hybrid core architectures.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Jun 26, 2024
1 parent c1bfca2 commit 7d67457
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pkg/cpuallocator/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,17 @@ func (a *allocatorHelper) takeIdleClusters() {
var (
offline = a.sys.OfflineCPUs()
pickIdle = func(c *cpuCluster) (bool, cpuset.CPUSet) {
// we only take E-clusters for low-prio requests
if a.prefer != PriorityLow && c.kind == sysfs.EfficientCore {
a.Debug(" - omit %s, CPU preference is %s", c, a.prefer)
return false, emptyCPUSet
}
// we only take P-clusters for other than low-prio requests
if a.prefer == PriorityLow && c.kind == sysfs.PerformanceCore {
a.Debug(" - omit %s, CPU preference is %s", c, a.prefer)
return false, emptyCPUSet
if len(a.topology.kind) > 1 {
// we only take E-clusters for low-prio requests
if a.prefer != PriorityLow && c.kind == sysfs.EfficientCore {
a.Debug(" - omit %s, CPU preference is %s", c, a.prefer)
return false, emptyCPUSet
}
// we only take P-clusters for other than low-prio requests
if a.prefer == PriorityLow && c.kind == sysfs.PerformanceCore {
a.Debug(" - omit %s, CPU preference is %s", c, a.prefer)
return false, emptyCPUSet
}
}

// we only take fully idle clusters
Expand Down

0 comments on commit 7d67457

Please sign in to comment.