From 1d264846812e503f6e9921dc5a2d0ec5ff8dde20 Mon Sep 17 00:00:00 2001 From: Rohit Jnagal Date: Sun, 4 Jan 2015 02:40:54 +0000 Subject: [PATCH] Fix reading cache info for machines with unused packages. Use thread ids instead of core-ids to identify caches. --- manager/machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/machine.go b/manager/machine.go index ccdb801b..ea37d361 100644 --- a/manager/machine.go +++ b/manager/machine.go @@ -179,7 +179,7 @@ func getTopology(sysFs sysfs.SysFs, cpuinfo string) ([]info.Node, int, error) { return nil, numCores, fmt.Errorf("could not detect any cores") } for idx, node := range nodes { - caches, err := sysinfo.GetCacheInfo(sysFs, node.Cores[0].Id) + caches, err := sysinfo.GetCacheInfo(sysFs, node.Cores[0].Threads[0]) if err != nil { return nil, -1, fmt.Errorf("failed to get cache information for node %d: %v", node.Id, err) }