Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpuallocator: don't filter based on single CoreKind. #345

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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