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

Ian Rogers posted 8 patches 1 year ago
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(-)
[PATCH v1 0/8] Cpumap improvements for large MAX_NR_CPUS
Posted by Ian Rogers 1 year ago
Prompted by Kyle Meyer's <kyle.meyer@hpe.com> 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
Re: [PATCH v1 0/8] Cpumap improvements for large MAX_NR_CPUS
Posted by Leo Yan 1 year ago
On Thu, Dec 05, 2024 at 08:40:27PM -0800, Ian Rogers wrote:
> 
> Prompted by Kyle Meyer's <kyle.meyer@hpe.com> 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.

Reviewed-by: Leo Yan <leo.yan@arm.com>
Re: [PATCH v1 0/8] Cpumap improvements for large MAX_NR_CPUS
Posted by Arnaldo Carvalho de Melo 1 year ago
On Fri, Dec 06, 2024 at 11:03:58PM +0000, Leo Yan wrote:
> On Thu, Dec 05, 2024 at 08:40:27PM -0800, Ian Rogers wrote:
> > 
> > Prompted by Kyle Meyer's <kyle.meyer@hpe.com> 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.
> 
> Reviewed-by: Leo Yan <leo.yan@arm.com>

Thanks, applied to perf-tools-next,

- Arnaldo