Re: [PATCH v2 0/7] PMU performance improvements

From: Namhyung Kim
Date: Tue Oct 17 2023 - 15:55:53 EST


On Thu, 12 Oct 2023 10:56:38 -0700, Ian Rogers wrote:
> Performance improvements to pmu scanning by holding onto the
> event/metric tables for a cpuid (avoid regular expression comparisons)
> and by lazily computing the default perf_event_attr for a PMU.
>
> Before
> % Running 'internals/pmu-scan' benchmark:
> Computing performance of sysfs PMU event scan for 100 times
> Average core PMU scanning took: 251.990 usec (+- 4.009 usec)
> Average PMU scanning took: 3222.460 usec (+- 211.234 usec)
> % Running 'internals/pmu-scan' benchmark:
> Computing performance of sysfs PMU event scan for 100 times
> Average core PMU scanning took: 260.120 usec (+- 7.905 usec)
> Average PMU scanning took: 3228.995 usec (+- 211.196 usec)
> % Running 'internals/pmu-scan' benchmark:
> Computing performance of sysfs PMU event scan for 100 times
> Average core PMU scanning took: 252.310 usec (+- 3.980 usec)
> Average PMU scanning took: 3220.675 usec (+- 210.844 usec)
>
> [...]

Applied to perf-tools-next, thanks!