Skip to content

Commit

Permalink
cpuallocator: use clustered allocation only with hybrid cores.
Browse files Browse the repository at this point in the history
Use explicit cluster info based allocation only on hybrid core
platforms. In other cases omit it altogether only using cache
group based allocation. These should provide identical groups
but for cache groups we do have partial allocation implemented
while for cluster groups we don't have ATM.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
  • Loading branch information
klihub committed Jun 28, 2024
1 parent a194caf commit e4ed880
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pkg/cpuallocator/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1072,11 +1072,17 @@ func (a *allocatorHelper) allocate() cpuset.CPUSet {
if (a.flags & AllocIdlePackages) != 0 {
a.takeIdlePackages()
}
if a.cnt > 0 && (a.flags&AllocIdleClusters) != 0 {
a.takeIdleClusters()
}
if a.cnt > 0 && (a.flags&AllocCacheGroups) != 0 {
a.takeCacheGroups()
if len(a.topology.kind) > 1 {
if a.cnt > 0 && (a.flags&AllocIdleClusters) != 0 {
a.takeIdleClusters()
}
if a.cnt > 0 && (a.flags&AllocCacheGroups) != 0 {
a.takeCacheGroups()
}
} else {
if a.cnt > 0 && (a.flags&AllocCacheGroups) != 0 {
a.takeCacheGroups()
}
}
if a.cnt > 0 && (a.flags&AllocIdleCores) != 0 {
a.takeIdleCores()
Expand Down

0 comments on commit e4ed880

Please sign in to comment.