You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf tests record: Update testcase to fix usage of affinity for machines with #CPUs > 1K
The perf record testcase fails on systems with more than 1K CPUs.
Testcase: perf test -vv "PERF_RECORD_* events & perf_sample fields"
PERF_RECORD_* events & perf_sample fields :
--- start ---
test child forked, pid 272482
sched_getaffinity: Invalid argument
sched__get_first_possible_cpu: Invalid argument
test child finished with -1
---- end ----
PERF_RECORD_* events & perf_sample fields: FAILED!
sched__get_first_possible_cpu uses "sched_getaffinity" to get the
cpumask and this call is returning EINVAL (Invalid argument).
This happens because the default mask size in glibc is 1024.
To overcome this 1024 CPUs mask size limitation of cpu_set_t, change the
mask size using the CPU_*_S macros ie, use CPU_ALLOC to allocate
cpumask, CPU_ALLOC_SIZE for size.
Same fix needed for mask which is used to setaffinity so that mask size
is large enough to represent number of possible CPU's in the system.
Reported-by: Tejas Manhas <[email protected]>
Signed-off-by: Athira Rajeev <[email protected]>
Tested-by: Ian Rogers <[email protected]>
Tested-by: Tejas Manhas <[email protected]>
Tested-by: Venkat Rao Bagalkote <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Aditya Bodkhe <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Hari Bathini <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
0 commit comments