Re: [PATCH v1] perf cpumap: Increment reference count for online cpumap
From: Thomas Richter
Date: Wed Mar 19 2025 - 05:05:53 EST
On 3/18/25 18:19, Ian Rogers wrote:
> Thomas Richter <tmricht@xxxxxxxxxxxxx> reported a double put on the
> cpumap for the placeholder core PMU:
> https://lore.kernel.org/lkml/20250318095132.1502654-3-tmricht@xxxxxxxxxxxxx/
> Requiring the caller to get the cpumap is not how these things are
> usually done, switch cpu_map__online to do the get and then fix up any
> use cases where a put is needed.
>
> Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
Ian,
thanks for fixing this. Here are the results on s390 z/VM:
# ./perf bench internals pmu-scan
# Running 'internals/pmu-scan' benchmark:
Computing performance of sysfs PMU event scan for 100 times
Average core PMU scanning took: 6.340 usec (+- 0.050 usec)
Average PMU scanning took: 93.785 usec (+- 6.210 usec)
#
Tested-by: Thomas Richter <tmricht@xxxxxxxxxxxxx>
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294