[PATCH v1 0/8] Cpumap improvements for large MAX_NR_CPUS

From: Ian Rogers
Date: Thu Dec 05 2024 - 23:43:34 EST


Prompted by Kyle Meyer's <kyle.meyer@xxxxxxx> report of the
MAX_NR_CPUS value being too small, initiate some clean up of its
use. Kyle's patch is at the head of the series. The additional patches
hide MAX_NR_CPUS as exposed from cpumap.h, reduce its use by removing
perf_cpu_map__read, and try to better size the temporary CPU array in
perf_cpu_map__new.

Ian Rogers (7):
perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS
libperf cpumap: Hide/reduce scope of MAX_NR_CPUS
libperf cpumap: Be tolerant of newline at the end of a cpumask
perf pmu: Remove use of perf_cpu_map__read
libperf cpumap: Remove use of perf_cpu_map__read
libperf cpumap: Remove perf_cpu_map__read
libperf cpumap: Grow array of read CPUs in smaller increments

Kyle Meyer (1):
perf: Increase MAX_NR_CPUS to 4096

tools/lib/perf/Documentation/libperf.txt | 1 -
tools/lib/perf/cpumap.c | 82 +++++-------------------
tools/lib/perf/include/internal/cpumap.h | 4 --
tools/lib/perf/include/perf/cpumap.h | 2 -
tools/lib/perf/libperf.map | 1 -
tools/perf/builtin-annotate.c | 1 +
tools/perf/builtin-diff.c | 1 +
tools/perf/builtin-kwork.c | 1 +
tools/perf/builtin-mem.c | 1 +
tools/perf/builtin-sched.c | 1 +
tools/perf/perf.h | 2 +-
tools/perf/util/bpf_skel/kwork_top.bpf.c | 4 +-
tools/perf/util/kwork.h | 1 +
tools/perf/util/pmu.c | 30 ++++++---
tools/perf/util/session.c | 1 +
tools/perf/util/svghelper.c | 1 +
16 files changed, 47 insertions(+), 87 deletions(-)

--
2.47.0.338.g60cca15819-goog