Skip to content

Commit

Permalink
cpuallocator: fix CPU cluster discovery.
Browse files Browse the repository at this point in the history
Use the correct die ID instead of the incorrect package ID
when querying per package CPU clusters during CPU cluster
discovery.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub authored and askervin committed Jun 20, 2024
1 parent 4364132 commit 46f5a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cpuallocator/allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ func (c *topologyCache) discoverCPUClusters(sys sysfs.System) {
pkg := sys.Package(id)
clusters := []*cpuCluster{}
for _, die := range pkg.DieIDs() {
for _, cl := range pkg.LogicalDieClusterIDs(id) {
for _, cl := range pkg.LogicalDieClusterIDs(die) {
if cpus := pkg.LogicalDieClusterCPUSet(die, cl); cpus.Size() > 0 {
clusters = append(clusters, &cpuCluster{
pkg: id,
Expand Down

0 comments on commit 46f5a40

Please sign in to comment.