CPU-ids can be sparse due to disabling a subset of CPUs.
On ppc64le this even will make the node_ids sparse, this is actually pretty
common on ppc64 when SMT is disabled.
Numad has the assumption of cpu/node-ids always being linear and due to that
accesses the 'node' array out of bounds. That triggers crashes like the
following:
Thread1"numad"receivedsignalSIGSEGV,Segmentationfault.#0 0x00000fb6cd2779f4 in bind_process_and_migrate_memory (p=0xfb6fc1e0f70)atnumad.c:998#1 0x00000fb6cd27d148 in manage_loads () at numad.c:2225#2 0x00000fb6cd2734dc in main (argc=<optimized out>, argv=<optimized out>)atnumad.c:2654
Instead of directly indexing with node_id we need to detect which array
element has the matching node_id and use that.
CPU-ids can be sparse due to disabling a subset of CPUs.
On ppc64le this even will make the node_ids sparse, this is actually pretty
common on ppc64 when SMT is disabled.
Numad has the assumption of cpu/node-ids always being linear and due to that
accesses the 'node' array out of bounds. That triggers crashes like the
following:
Instead of directly indexing with node_id we need to detect which array
element has the matching node_id and use that.
Signed-off-by: Christian Ehrhardt christian.ehrhardt@canonical.com