diff options
-rw-r--r-- | tools/perf/bench/numa.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c index e58be7eeced8..7b364f2926d4 100644 --- a/tools/perf/bench/numa.c +++ b/tools/perf/bench/numa.c @@ -373,8 +373,10 @@ static u8 *alloc_data(ssize_t bytes0, int map_flags, /* Allocate and initialize all memory on CPU#0: */ if (init_cpu0) { - orig_mask = bind_to_node(0); - bind_to_memnode(0); + int node = numa_node_of_cpu(0); + + orig_mask = bind_to_node(node); + bind_to_memnode(node); } bytes = bytes0 + HPSIZE; |