perf record: Fix binding of AIO user space buffers to nodes
authorAlexey Budankov <alexey.budankov@linux.intel.com>
Thu, 12 Mar 2020 12:21:45 +0000 (15:21 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 12 Mar 2020 14:32:46 +0000 (11:32 -0300)
commit44d462acc0bf3eabe1522471fd1f683d8ce612cb
tree4798c88b8b13fcc80f2525bd5a9e2b2f617b912f
parent67439d555f7d46349deef56886129da96bd15744
perf record: Fix binding of AIO user space buffers to nodes

Correct maxnode parameter value passed to mbind() syscall to be the
amount of node mask bits to analyze plus 1. Dynamically allocate node
mask memory depending on the index of node of cpu being profiled.

Fixes: c44a8b44ca9f ("perf record: Bind the AIO user space buffers to nodes")
Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/c7ea8ffe-1357-bf9e-3a89-1da1d8e9b75b@linux.intel.com
[ Remove leftover nr_bits + 1 comment in mbind() call ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/mmap.c