Re: [PATCH v1 1/4] perf vendor events intel: Alderlake/rocketlake metric fixes

From: Liang, Kan
Date: Thu Jan 04 2024 - 09:30:34 EST




On 2024-01-04 8:56 a.m., Ian Rogers wrote:
>> Testing tma_slow_pause
>> Metric 'tma_slow_pause' not printed in:
>> # Running 'internals/synthesize' benchmark:
>> Computing performance of single threaded perf event synthesis by
>> synthesizing events on the perf process itself:
>> Average synthesis took: 49.987 usec (+- 0.049 usec)
>> Average num. events: 47.000 (+- 0.000)
>> Average time per event 1.064 usec
>> Average data synthesis took: 53.490 usec (+- 0.033 usec)
>> Average num. events: 245.000 (+- 0.000)
>> Average time per event 0.218 usec
>>
>> Performance counter stats for 'perf bench internals synthesize':
>>
>> <not counted> cpu_core/TOPDOWN.SLOTS/ (0.00%)
>> <not counted> cpu_core/topdown-retiring/ (0.00%)
>> <not counted> cpu_core/topdown-mem-bound/ (0.00%)
>> <not counted> cpu_core/topdown-bad-spec/ (0.00%)
>> <not counted> cpu_core/topdown-fe-bound/ (0.00%)
>> <not counted> cpu_core/topdown-be-bound/ (0.00%)
>> <not counted> cpu_core/RESOURCE_STALLS.SCOREBOARD/ (0.00%)
>> <not counted> cpu_core/EXE_ACTIVITY.1_PORTS_UTIL/ (0.00%)
>> <not counted> cpu_core/EXE_ACTIVITY.BOUND_ON_LOADS/ (0.00%)
>> <not counted> cpu_core/CPU_CLK_UNHALTED.PAUSE/ (0.00%)
>> <not counted> cpu_core/CYCLE_ACTIVITY.STALLS_TOTAL/ (0.00%)
>> <not counted> cpu_core/CPU_CLK_UNHALTED.THREAD/ (0.00%)
>> <not counted> cpu_core/ARITH.DIV_ACTIVE/ (0.00%)
>> <not counted> cpu_core/EXE_ACTIVITY.2_PORTS_UTIL,umask=0xc/ (0.00%)
>> <not counted> cpu_core/EXE_ACTIVITY.3_PORTS_UTIL,umask=0x80/ (0.00%)
>>
>> 1.186254766 seconds time elapsed
>>
>> 0.427220000 seconds user
>> 0.752217000 seconds sys
>> Testing smi_cycles
>> Testing smi_num
>> Testing tsx_aborted_cycles
>> Testing tsx_cycles_per_elision
>> Testing tsx_cycles_per_transaction
>> Testing tsx_transactional_cycles
>> test child finished with -1
>> ---- end ----
>> perf all metrics test: FAILED!
>> root@number:~#
> Have a try disabling the NMI watchdog. Agreed that there is more to
> fix here but I think the PMU driver is in part to blame because
> manually breaking the weak group of events is a fix.

I think we have a NO_GROUP_EVENTS_NMI metric constraint to mark a group
which require disabling of the NMI watchdog.
Maybe we should mark the group a NO_GROUP_EVENTS_NMI metric.

Thanks,
Kan

> Fwiw, if we
> switch to the buddy watchdog mechanism then we'll no longer need to
> disable the NMI watchdog:
> https://lore.kernel.org/lkml/20230421155255.1.I6bf789d21d0c3d75d382e7e51a804a7a51315f2c@changeid/