kernel
kernel copied to clipboard
[6.6-velinux] Intel: Backport PMU support and dependency for CWF platform
Description
This is to backport PMU core/uncore/tool upstream patches for CWF platform.
Test
- core PMU perf counting test
[root@cwf linux]# tools/perf/perf stat -a sleep 1
Performance counter stats for 'system wide':
491,357.35 msec cpu-clock # 482.195 CPUs utilized
2,471 context-switches # 5.029 /sec
481 cpu-migrations # 0.979 /sec
88 page-faults # 0.179 /sec
650,502,887 cycles # 0.001 GHz
185,129,269 instructions # 0.28 insn per cycle
37,198,246 branches # 75.705 K/sec
216,984 branch-misses # 0.58% of all branches
1.019001085 seconds time elapsed
- core PMU perf recording tests (fixed and GP counters) pass.
[root@cwf linux]# tools/perf/perf record -e instructions -Iax,bx -b -c 100000 sleep 1
[ perf record: Woken up 2 times to write data ]
[ perf record: Captured and wrote 0.047 MB perf.data (27 samples) ]
[root@cwf linux]# tools/perf/perf record -e branches -Iax,bx -b -c 10000 sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.066 MB perf.data (60 samples) ]
- uncore devices can be seen in sysfs
[root@cwf linux]# ls /sys/devices/* | grep uncore
- uncore PMU perf counting tests pass.
[root@cwf linux]# tools/perf/perf stat -e uncore_upi/event=0x1/,uncore_cha/event=0x1/,uncore_imc/event=0x1/ -a sleep 1
Performance counter stats for 'system wide':
25,144,619,084 uncore_upi/event=0x1/
109,517,186,568 uncore_cha/event=0x1/
22,178,643,523 uncore_imc/event=0x1/
1.004042980 seconds time elapsed
- CWF specific perf event counting test pass.
[root@cwf linux]# tools/perf/perf stat -e LONGEST_LAT_CACHE.MISS,LONGEST_LAT_CACHE.REFERENCE -a sleep 1
Performance counter stats for 'system wide':
825,684 LONGEST_LAT_CACHE.MISS
11,596,700 LONGEST_LAT_CACHE.REFERENCE
1.014799623 seconds time elapsed
- CWF specific perf event sampling test pass.
[root@cwf linux]# tools/perf/perf record -e LONGEST_LAT_CACHE.MISS,LONGEST_LAT_CACHE.REFERENCE -c 10000 -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.852 MB perf.data (1082 samples) ]
- GNR TPMI based RAPL PMU events available
$ perf list | grep -i energy
power/energy-pkg/ [Kernel PMU event]
power/energy-ram/ [Kernel PMU event]