Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test
From: David Coe
Date: Wed Apr 14 2021 - 18:18:12 EST
Hi again!
For completeness, I'm attaching results for the revert+update patch
running the Ubuntu 21.04β kernel 5.11.0-14 on a Ryzen 4700U laptop.
The enormous amd_iommu running stats aren't always there, as they nearly
always are on the the 2400G desktop, but they do turn up (depending on
what the machine's been doing).
Be very interested in your thoughts on their relevance!
Best regards,
--
David
$ sudo dmesg | grep IOMMU
[ 0.498593] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 0.500507] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[ 0.502011] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
[ 1.113195] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@xxxxxxx>
$ sudo perf list | grep iommu
amd_iommu_0/cmd_processed/ [Kernel PMU event]
amd_iommu_0/cmd_processed_inv/ [Kernel PMU event]
amd_iommu_0/ign_rd_wr_mmio_1ff8h/ [Kernel PMU event]
amd_iommu_0/int_dte_hit/ [Kernel PMU event]
amd_iommu_0/int_dte_mis/ [Kernel PMU event]
amd_iommu_0/mem_dte_hit/ [Kernel PMU event]
amd_iommu_0/mem_dte_mis/ [Kernel PMU event]
amd_iommu_0/mem_iommu_tlb_pde_hit/ [Kernel PMU event]
amd_iommu_0/mem_iommu_tlb_pde_mis/ [Kernel PMU event]
amd_iommu_0/mem_iommu_tlb_pte_hit/ [Kernel PMU event]
amd_iommu_0/mem_iommu_tlb_pte_mis/ [Kernel PMU event]
amd_iommu_0/mem_pass_excl/ [Kernel PMU event]
amd_iommu_0/mem_pass_pretrans/ [Kernel PMU event]
amd_iommu_0/mem_pass_untrans/ [Kernel PMU event]
amd_iommu_0/mem_target_abort/ [Kernel PMU event]
amd_iommu_0/mem_trans_total/ [Kernel PMU event]
amd_iommu_0/page_tbl_read_gst/ [Kernel PMU event]
amd_iommu_0/page_tbl_read_nst/ [Kernel PMU event]
amd_iommu_0/page_tbl_read_tot/ [Kernel PMU event]
amd_iommu_0/smi_blk/ [Kernel PMU event]
amd_iommu_0/smi_recv/ [Kernel PMU event]
amd_iommu_0/tlb_inv/ [Kernel PMU event]
amd_iommu_0/vapic_int_guest/ [Kernel PMU event]
amd_iommu_0/vapic_int_non_guest/ [Kernel PMU event]
intel_iommu:bounce_map_sg [Tracepoint event]
intel_iommu:bounce_map_single [Tracepoint event]
intel_iommu:bounce_unmap_single [Tracepoint event]
intel_iommu:map_sg [Tracepoint event]
intel_iommu:map_single [Tracepoint event]
intel_iommu:unmap_sg [Tracepoint event]
intel_iommu:unmap_single [Tracepoint event]
iommu:add_device_to_group [Tracepoint event]
iommu:attach_device_to_domain [Tracepoint event]
iommu:detach_device_from_domain [Tracepoint event]
iommu:io_page_fault [Tracepoint event]
iommu:map [Tracepoint event]
iommu:remove_device_from_group [Tracepoint event]
iommu:unmap [Tracepoint event]
$ sudo perf stat -e 'amd_iommu_0/cmd_processed/, amd_iommu_0/cmd_processed_inv/, amd_iommu_0/ign_rd_wr_mmio_1ff8h/, amd_iommu_0/int_dte_hit/, amd_iommu_0/int_dte_mis/, amd_iommu_0/mem_dte_hit/, amd_iommu_0/mem_dte_mis/, amd_iommu_0/mem_iommu_tlb_pde_hit/, amd_iommu_0/mem_iommu_tlb_pde_mis/, amd_iommu_0/mem_iommu_tlb_pte_hit/, amd_iommu_0/mem_iommu_tlb_pte_mis/, amd_iommu_0/mem_pass_excl/, amd_iommu_0/mem_pass_pretrans/, amd_iommu_0/mem_pass_untrans/, amd_iommu_0/mem_target_abort/, amd_iommu_0/mem_trans_total/, amd_iommu_0/page_tbl_read_gst/, amd_iommu_0/page_tbl_read_nst/, amd_iommu_0/page_tbl_read_tot/, amd_iommu_0/smi_blk/, amd_iommu_0/smi_recv/, amd_iommu_0/tlb_inv/, amd_iommu_0/vapic_int_guest/, amd_iommu_0/vapic_int_non_guest/' sleep 10
Performance counter stats for 'system wide':
30 amd_iommu_0/cmd_processed/ (33.31%)
17 amd_iommu_0/cmd_processed_inv/ (33.34%)
0 amd_iommu_0/ign_rd_wr_mmio_1ff8h/ (33.36%)
374 amd_iommu_0/int_dte_hit/ (33.39%)
29 amd_iommu_0/int_dte_mis/ (33.44%)
394 amd_iommu_0/mem_dte_hit/ (33.46%)
9,117 amd_iommu_0/mem_dte_mis/ (33.45%)
5 amd_iommu_0/mem_iommu_tlb_pde_hit/ (33.46%)
819 amd_iommu_0/mem_iommu_tlb_pde_mis/ (33.42%)
2 amd_iommu_0/mem_iommu_tlb_pte_hit/ (33.39%)
1,012 amd_iommu_0/mem_iommu_tlb_pte_mis/ (33.37%)
0 amd_iommu_0/mem_pass_excl/ (33.34%)
0 amd_iommu_0/mem_pass_pretrans/ (33.29%)
1,553 amd_iommu_0/mem_pass_untrans/ (33.28%)
0 amd_iommu_0/mem_target_abort/ (33.28%)
39,207 amd_iommu_0/mem_trans_total/ (33.27%)
0 amd_iommu_0/page_tbl_read_gst/ (33.27%)
1,625 amd_iommu_0/page_tbl_read_nst/ (33.27%)
901 amd_iommu_0/page_tbl_read_tot/ (33.27%)
0 amd_iommu_0/smi_blk/ (33.7%)
0 amd_iommu_0/smi_recv/ (33.28%)
0 amd_iommu_0/tlb_inv/ (33.27%)
0 amd_iommu_0/vapic_int_guest/ (33.27%)
420 amd_iommu_0/vapic_int_non_guest/ (33.27%)
10.003004096 seconds time elapsed