Skip to content

Commit 9a1e106

Browse files
Kyle Meyeracmel
authored andcommitted
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 <irogers@google.com> Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Kyle Meyer <kyle.meyer@hpe.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ben Gainey <ben.gainey@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241206044035.1062032-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 9e7a00e commit 9a1e106

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

tools/lib/perf/include/internal/cpumap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DECLARE_RC_STRUCT(perf_cpu_map) {
2222
};
2323

2424
#ifndef MAX_NR_CPUS
25-
#define MAX_NR_CPUS 2048
25+
#define MAX_NR_CPUS 4096
2626
#endif
2727

2828
struct perf_cpu_map *perf_cpu_map__alloc(int nr_cpus);

tools/perf/perf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define _PERF_PERF_H
44

55
#ifndef MAX_NR_CPUS
6-
#define MAX_NR_CPUS 2048
6+
#define MAX_NR_CPUS 4096
77
#endif
88

99
enum perf_affinity {

tools/perf/util/bpf_skel/kwork_top.bpf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ enum kwork_class_type {
1818
};
1919

2020
#define MAX_ENTRIES 102400
21-
#define MAX_NR_CPUS 2048
21+
#ifndef MAX_NR_CPUS
22+
#define MAX_NR_CPUS 4096
23+
#endif
2224
#define PF_KTHREAD 0x00200000
2325
#define MAX_COMMAND_LEN 16
2426

0 commit comments

Comments
 (0)