Open adamliyi opened 3 years ago
Tested with upstream 5.14 kernel (and perf tool is also from 5.14 kernel. This issue seems fixed.
# perf --version
perf version 5.13.g77d34a4683b0
# perf stat -e smmuv3_pmcg_27ffe0202/transaction/,smmuv3_pmcg_27ffe0202/tlb_miss/ -a -I 1000 sleep 5
# time counts unit events
1.001040994 0 smmuv3_pmcg_27ffe0202/transaction/
1.001040994 0 smmuv3_pmcg_27ffe0202/tlb_miss/
2.002179028 0 smmuv3_pmcg_27ffe0202/transaction/
2.002179028 0 smmuv3_pmcg_27ffe0202/tlb_miss/
3.003257062 0 smmuv3_pmcg_27ffe0202/transaction/
3.003257062 0 smmuv3_pmcg_27ffe0202/tlb_miss/
4.004313056 0 smmuv3_pmcg_27ffe0202/transaction/
4.004313056 0 smmuv3_pmcg_27ffe0202/tlb_miss/
5.001304670 0 smmuv3_pmcg_27ffe0202/transaction/
5.001304670 0 smmuv3_pmcg_27ffe0202/tlb_miss/
Fixed by commit: https://github.com/AmpereComputing/ampere-lts-kernel/commit/79aa8c94e778af7a915e8d08063ba9f72edca4d3. Backport upstream patch from 5.14 kernel: https://github.com/torvalds/linux/commit/4c1daba15c209b99d192f147fea3dade30f72ed2
Kernel 5.10.27. Without running any io workload.
We cannot sample two events in one 'perf stat' command. e.g:
But if we sample two events in one command, tlb_miss will report non-zero value
Does smmu pmu counter by design cannot be re-used?