[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR09MB263838403F08887094285F8DC74A9@VI1PR09MB2638.eurprd09.prod.outlook.com>
Date:   Sun, 18 Apr 2021 20:16:26 +0100
From:   David Coe <david.coe@...e.co.uk>
To:     "Suthikulpanit, Suravee" <suravee.suthikulpanit@....com>,
        linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org
Cc:     joro@...tes.org, will@...nel.org, jsnitsel@...hat.com,
        pmenzel@...gen.mpg.de, Jon.Grimm@....com,
        Tj <ml.linux@...oe.vision>,
        Shuah Khan <skhan@...uxfoundation.org>,
        Alexander Monakov <amonakov@...ras.ru>,
        Alex Hung <1917203@...s.launchpad.net>
Subject: Re: [PATCH 2/2] iommu/amd: Remove performance counter
 pre-initialization test
Hi Suravee!
Results for Ryzen 2400G on Ubuntu 20.10, kernel 5.8.0-50 with patch 2/2 
alone. Events batched 3 x 8 to avoid counter-multiplexing (?) artefacts.
On 15/04/2021 10:28, Suthikulpanit, Suravee wrote:
> David,
> 
> For the Ryzen 2400G, could you please try with:
> - 1 event at a time
> - Not more than 8 events (On your system, it has 2 banks x 4 counters/bank.
> I am trying to see if this issue might be related to the counters 
> multiplexing).
> 
$ sudo dmesg | grep IOMMU
[sudo] password for info:
[    0.543768] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters 
supported
[    0.547696] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[    0.549196] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 
counters/bank).
[    0.811538] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@...e.de>
$ declare -a EventList=("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/")
$ for event in "${EventList[@]}"; do sudo perf stat -e "$event" sleep 10 
; done
  Performance counter stats for 'system wide':
                 18       amd_iommu_0/cmd_processed/ 
                  9       amd_iommu_0/cmd_processed_inv/ 
                  0       amd_iommu_0/ign_rd_wr_mmio_1ff8h/ 
                399       amd_iommu_0/int_dte_hit/ 
                 19       amd_iommu_0/int_dte_mis/ 
              1,177       amd_iommu_0/mem_dte_hit/ 
              5,521       amd_iommu_0/mem_dte_mis/ 
                 70       amd_iommu_0/mem_iommu_tlb_pde_hit/ 
       10.001490092 seconds time elapsed
  Performance counter stats for 'system wide':
                394       amd_iommu_0/mem_iommu_tlb_pde_mis/ 
                602       amd_iommu_0/mem_iommu_tlb_pte_hit/ 
              6,612       amd_iommu_0/mem_iommu_tlb_pte_mis/ 
                  0       amd_iommu_0/mem_pass_excl/ 
                  0       amd_iommu_0/mem_pass_pretrans/ 
              6,590       amd_iommu_0/mem_pass_untrans/ 
                  0       amd_iommu_0/mem_target_abort/ 
                616       amd_iommu_0/mem_trans_total/ 
       10.001237585 seconds time elapsed
  Performance counter stats for 'system wide':
                  0       amd_iommu_0/page_tbl_read_gst/ 
                 78       amd_iommu_0/page_tbl_read_nst/ 
                 78       amd_iommu_0/page_tbl_read_tot/ 
                  0       amd_iommu_0/smi_blk/ 
                  0       amd_iommu_0/smi_recv/ 
                  0       amd_iommu_0/tlb_inv/ 
                  0       amd_iommu_0/vapic_int_guest/ 
                637       amd_iommu_0/vapic_int_non_guest/ 
       10.001186031 seconds time elapsed
Best regards,
-- 
David
Powered by blists - more mailing lists