From: Kyle Meyer Date: Fri, 6 Dec 2024 04:40:28 +0000 (-0800) Subject: perf: Increase MAX_NR_CPUS to 4096 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9a1e106550be574d75e3eba5e9aa4ef96473e058;p=users%2Fdwmw2%2Flinux.git perf: Increase MAX_NR_CPUS to 4096 Systems have surpassed 2048 CPUs. Increase MAX_NR_CPUS to 4096. Bitmaps declared with MAX_NR_CPUS bits will increase from 256B to 512B, cpus_runtime will increase from 81960B to 163880B, and max_entries will increase from 8192B to 16384B. Reviewed-by: Ian Rogers Reviewed-by: Leo Yan Signed-off-by: Kyle Meyer Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ben Gainey Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20241206044035.1062032-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/lib/perf/include/internal/cpumap.h b/tools/lib/perf/include/internal/cpumap.h index 49649eb51ce45..3cf28522004e9 100644 --- a/tools/lib/perf/include/internal/cpumap.h +++ b/tools/lib/perf/include/internal/cpumap.h @@ -22,7 +22,7 @@ DECLARE_RC_STRUCT(perf_cpu_map) { }; #ifndef MAX_NR_CPUS -#define MAX_NR_CPUS 2048 +#define MAX_NR_CPUS 4096 #endif struct perf_cpu_map *perf_cpu_map__alloc(int nr_cpus); diff --git a/tools/perf/perf.h b/tools/perf/perf.h index c004dd4e65a3f..3cb40965549f5 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -3,7 +3,7 @@ #define _PERF_PERF_H #ifndef MAX_NR_CPUS -#define MAX_NR_CPUS 2048 +#define MAX_NR_CPUS 4096 #endif enum perf_affinity { diff --git a/tools/perf/util/bpf_skel/kwork_top.bpf.c b/tools/perf/util/bpf_skel/kwork_top.bpf.c index 594da91965a2f..73e32e0630301 100644 --- a/tools/perf/util/bpf_skel/kwork_top.bpf.c +++ b/tools/perf/util/bpf_skel/kwork_top.bpf.c @@ -18,7 +18,9 @@ enum kwork_class_type { }; #define MAX_ENTRIES 102400 -#define MAX_NR_CPUS 2048 +#ifndef MAX_NR_CPUS +#define MAX_NR_CPUS 4096 +#endif #define PF_KTHREAD 0x00200000 #define MAX_COMMAND_LEN 16