Revision 5501e9229a80d95a1ea68609f44c447a75d23ed5 authored by Adrian Hunter on 07 January 2021, 17:41:59 UTC, committed by Arnaldo Carvalho de Melo on 15 January 2021, 20:28:27 UTC
In some cases, the number of cpus (nr_cpus_online) is confused with the
maximum cpu number (nr_cpus_avail), which results in the error in the
example below:

Example on system with 8 cpus:

 Before:
   # echo 0 > /sys/devices/system/cpu/cpu2/online
   # ./perf record --kcore -e intel_pt// taskset --cpu-list 7 uname
   Linux
   [ perf record: Woken up 1 times to write data ]
   [ perf record: Captured and wrote 0.147 MB perf.data ]
   # ./perf script --itrace=e
   Requested CPU 7 too large. Consider raising MAX_NR_CPUS
   0x25908 [0x8]: failed to process type: 68 [Invalid argument]

 After:
   # ./perf script --itrace=e
   #

Fixes: 8c7274691f0d ("perf machine: Replace MAX_NR_CPUS with perf_env::nr_cpus_online")
Fixes: 7df4e36a4785 ("perf session: Replace MAX_NR_CPUS with perf_env::nr_cpus_online")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: stable@vger.kernel.org
Link: http://lore.kernel.org/lkml/20210107174159.24897-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent a1bf230
History
File Mode Size
Kconfig -rw-r--r-- 642 bytes
Makefile -rw-r--r-- 255 bytes
af_smc.c -rw-r--r-- 65.1 KB
smc.h -rw-r--r-- 8.5 KB
smc_cdc.c -rw-r--r-- 13.6 KB
smc_cdc.h -rw-r--r-- 8.3 KB
smc_clc.c -rw-r--r-- 22.9 KB
smc_clc.h -rw-r--r-- 11.0 KB
smc_close.c -rw-r--r-- 12.2 KB
smc_close.h -rw-r--r-- 759 bytes
smc_core.c -rw-r--r-- 61.0 KB
smc_core.h -rw-r--r-- 15.1 KB
smc_diag.c -rw-r--r-- 7.4 KB
smc_ib.c -rw-r--r-- 22.9 KB
smc_ib.h -rw-r--r-- 3.6 KB
smc_ism.c -rw-r--r-- 13.1 KB
smc_ism.h -rw-r--r-- 1.8 KB
smc_llc.c -rw-r--r-- 53.6 KB
smc_llc.h -rw-r--r-- 3.6 KB
smc_netlink.c -rw-r--r-- 1.9 KB
smc_netlink.h -rw-r--r-- 605 bytes
smc_netns.h -rw-r--r-- 381 bytes
smc_pnet.c -rw-r--r-- 29.3 KB
smc_pnet.h -rw-r--r-- 1.7 KB
smc_rx.c -rw-r--r-- 11.6 KB
smc_rx.h -rw-r--r-- 715 bytes
smc_tx.c -rw-r--r-- 18.6 KB
smc_tx.h -rw-r--r-- 1.1 KB
smc_wr.c -rw-r--r-- 20.0 KB
smc_wr.h -rw-r--r-- 3.5 KB

back to top