From: David Coe <david.coe@live.co.uk> To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Cc: joro@8bytes.org, will@kernel.org, jsnitsel@redhat.com, pmenzel@molgen.mpg.de, Jon.Grimm@amd.com, Tj <ml.linux@elloe.vision>, Shuah Khan <skhan@linuxfoundation.org>, Alexander Monakov <amonakov@ispras.ru>, Alex Hung <1917203@bugs.launchpad.net> Subject: Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test Date: Sat, 10 Apr 2021 09:17:31 +0100 [thread overview] Message-ID: <VI1PR09MB2638FACB956277A7CEAAE367C7729@VI1PR09MB2638.eurprd09.prod.outlook.com> (raw) In-Reply-To: <20210409085848.3908-3-suravee.suthikulpanit@amd.com> Well, well! This is a promising start to the weekend. Thank you both, Suravee and Paul. Results for AMD Ryzen 4 2400G running Ubuntu 21.04β kernel 5.11.0-13 and Windows 10 2H2 under KVM $ sudo dmesg | grep IOMMU [ 0.557725] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported [ 0.561538] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40 [ 0.562828] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). [ 0.881108] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de> $ systool -m kvm_amd -v Module = "kvm_amd" Attributes: coresize = "114688" initsize = "0" initstate = "live" refcnt = "0" srcversion = "4371BA17A41823101F90761" taint = "" uevent = <store method only> Parameters: avic = "0" dump_invalid_vmcb = "N" nested = "1" npt = "1" nrips = "1" pause_filter_count_grow= "2" pause_filter_count_max= "65535" pause_filter_count_shrink= "0" pause_filter_count = "3000" pause_filter_thresh = "128" sev_es = "0" sev = "0" vgif = "1" vls = "1" Sections: $ compgen -G "/sys/kernel/iommu_groups/*/devices/*" /sys/kernel/iommu_groups/9/devices/0000:09:00.0 /sys/kernel/iommu_groups/0/devices/0000:00:01.0 /sys/kernel/iommu_groups/10/devices/0000:0a:00.0 /sys/kernel/iommu_groups/2/devices/0000:00:01.6 /sys/kernel/iommu_groups/12/devices/0000:0b:00.0 /sys/kernel/iommu_groups/4/devices/0000:00:08.1 /sys/kernel/iommu_groups/6/devices/0000:00:14.0 /sys/kernel/iommu_groups/6/devices/0000:00:14.3 /sys/kernel/iommu_groups/8/devices/0000:02:04.0 /sys/kernel/iommu_groups/8/devices/0000:02:01.0 /sys/kernel/iommu_groups/8/devices/0000:04:00.0 /sys/kernel/iommu_groups/8/devices/0000:01:00.1 /sys/kernel/iommu_groups/8/devices/0000:02:06.0 /sys/kernel/iommu_groups/8/devices/0000:01:00.0 /sys/kernel/iommu_groups/8/devices/0000:01:00.2 /sys/kernel/iommu_groups/8/devices/0000:08:00.0 /sys/kernel/iommu_groups/8/devices/0000:02:00.0 /sys/kernel/iommu_groups/8/devices/0000:02:07.0 /sys/kernel/iommu_groups/8/devices/0000:03:00.0 /sys/kernel/iommu_groups/1/devices/0000:00:01.2 /sys/kernel/iommu_groups/11/devices/0000:0a:00.1 /sys/kernel/iommu_groups/11/devices/0000:0a:00.3 /sys/kernel/iommu_groups/11/devices/0000:0a:00.2 /sys/kernel/iommu_groups/11/devices/0000:0a:00.4 /sys/kernel/iommu_groups/11/devices/0000:0a:00.6 /sys/kernel/iommu_groups/3/devices/0000:00:08.0 /sys/kernel/iommu_groups/5/devices/0000:00:08.2 /sys/kernel/iommu_groups/7/devices/0000:00:18.5 /sys/kernel/iommu_groups/7/devices/0000:00:18.7 /sys/kernel/iommu_groups/7/devices/0000:00:18.0 /sys/kernel/iommu_groups/7/devices/0000:00:18.2 /sys/kernel/iommu_groups/7/devices/0000:00:18.4 /sys/kernel/iommu_groups/7/devices/0000:00:18.6 /sys/kernel/iommu_groups/7/devices/0000:00:18.1 /sys/kernel/iommu_groups/7/devices/0000:00:18.3 $ sudo kvm-ok INFO: /dev/kvm exists KVM acceleration can be used $ 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': 0 amd_iommu_0/cmd_processed/ (33.32%) 2 amd_iommu_0/cmd_processed_inv/ (33.35%) 0 amd_iommu_0/ign_rd_wr_mmio_1ff8h/ (33.39%) 340 amd_iommu_0/int_dte_hit/ (33.43%) 23 amd_iommu_0/int_dte_mis/ (33.44%) 556 amd_iommu_0/mem_dte_hit/ (33.44%) 841,689,151,202,939 amd_iommu_0/mem_dte_mis/ (33.44%) 74 amd_iommu_0/mem_iommu_tlb_pde_hit/ (33.44%) 502 amd_iommu_0/mem_iommu_tlb_pde_mis/ (33.41%) 1,195 amd_iommu_0/mem_iommu_tlb_pte_hit/ (33.36%) 8,017 amd_iommu_0/mem_iommu_tlb_pte_mis/ (33.33%) 0 amd_iommu_0/mem_pass_excl/ (33.29%) 0 amd_iommu_0/mem_pass_pretrans/ (33.28%) 16,504 amd_iommu_0/mem_pass_untrans/ (33.28%) 0 amd_iommu_0/mem_target_abort/ (33.28%) 2,842 amd_iommu_0/mem_trans_total/ (33.28%) 0 amd_iommu_0/page_tbl_read_gst/ (33.28%) 111 amd_iommu_0/page_tbl_read_nst/ (33.29%) 111 amd_iommu_0/page_tbl_read_tot/ (33.28%) 0 amd_iommu_0/smi_blk/ (33.28%) 0 amd_iommu_0/smi_recv/ (33.29%) 0 amd_iommu_0/tlb_inv/ (33.28%) 0 amd_iommu_0/vapic_int_guest/ (33.28%) 345 amd_iommu_0/vapic_int_non_guest/ (33.29%) 10.000799128 seconds time elapsed Results for Ryzen 7 4700U to follow. -- David Coe
WARNING: multiple messages have this Message-ID (diff)
From: David Coe <david.coe@live.co.uk> To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Cc: pmenzel@molgen.mpg.de, Alexander Monakov <amonakov@ispras.ru>, Alex Hung <1917203@bugs.launchpad.net>, Jon.Grimm@amd.com, Shuah Khan <skhan@linuxfoundation.org>, Tj <ml.linux@elloe.vision>, will@kernel.org Subject: Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test Date: Sat, 10 Apr 2021 09:17:31 +0100 [thread overview] Message-ID: <VI1PR09MB2638FACB956277A7CEAAE367C7729@VI1PR09MB2638.eurprd09.prod.outlook.com> (raw) In-Reply-To: <20210409085848.3908-3-suravee.suthikulpanit@amd.com> Well, well! This is a promising start to the weekend. Thank you both, Suravee and Paul. Results for AMD Ryzen 4 2400G running Ubuntu 21.04β kernel 5.11.0-13 and Windows 10 2H2 under KVM $ sudo dmesg | grep IOMMU [ 0.557725] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported [ 0.561538] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40 [ 0.562828] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). [ 0.881108] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de> $ systool -m kvm_amd -v Module = "kvm_amd" Attributes: coresize = "114688" initsize = "0" initstate = "live" refcnt = "0" srcversion = "4371BA17A41823101F90761" taint = "" uevent = <store method only> Parameters: avic = "0" dump_invalid_vmcb = "N" nested = "1" npt = "1" nrips = "1" pause_filter_count_grow= "2" pause_filter_count_max= "65535" pause_filter_count_shrink= "0" pause_filter_count = "3000" pause_filter_thresh = "128" sev_es = "0" sev = "0" vgif = "1" vls = "1" Sections: $ compgen -G "/sys/kernel/iommu_groups/*/devices/*" /sys/kernel/iommu_groups/9/devices/0000:09:00.0 /sys/kernel/iommu_groups/0/devices/0000:00:01.0 /sys/kernel/iommu_groups/10/devices/0000:0a:00.0 /sys/kernel/iommu_groups/2/devices/0000:00:01.6 /sys/kernel/iommu_groups/12/devices/0000:0b:00.0 /sys/kernel/iommu_groups/4/devices/0000:00:08.1 /sys/kernel/iommu_groups/6/devices/0000:00:14.0 /sys/kernel/iommu_groups/6/devices/0000:00:14.3 /sys/kernel/iommu_groups/8/devices/0000:02:04.0 /sys/kernel/iommu_groups/8/devices/0000:02:01.0 /sys/kernel/iommu_groups/8/devices/0000:04:00.0 /sys/kernel/iommu_groups/8/devices/0000:01:00.1 /sys/kernel/iommu_groups/8/devices/0000:02:06.0 /sys/kernel/iommu_groups/8/devices/0000:01:00.0 /sys/kernel/iommu_groups/8/devices/0000:01:00.2 /sys/kernel/iommu_groups/8/devices/0000:08:00.0 /sys/kernel/iommu_groups/8/devices/0000:02:00.0 /sys/kernel/iommu_groups/8/devices/0000:02:07.0 /sys/kernel/iommu_groups/8/devices/0000:03:00.0 /sys/kernel/iommu_groups/1/devices/0000:00:01.2 /sys/kernel/iommu_groups/11/devices/0000:0a:00.1 /sys/kernel/iommu_groups/11/devices/0000:0a:00.3 /sys/kernel/iommu_groups/11/devices/0000:0a:00.2 /sys/kernel/iommu_groups/11/devices/0000:0a:00.4 /sys/kernel/iommu_groups/11/devices/0000:0a:00.6 /sys/kernel/iommu_groups/3/devices/0000:00:08.0 /sys/kernel/iommu_groups/5/devices/0000:00:08.2 /sys/kernel/iommu_groups/7/devices/0000:00:18.5 /sys/kernel/iommu_groups/7/devices/0000:00:18.7 /sys/kernel/iommu_groups/7/devices/0000:00:18.0 /sys/kernel/iommu_groups/7/devices/0000:00:18.2 /sys/kernel/iommu_groups/7/devices/0000:00:18.4 /sys/kernel/iommu_groups/7/devices/0000:00:18.6 /sys/kernel/iommu_groups/7/devices/0000:00:18.1 /sys/kernel/iommu_groups/7/devices/0000:00:18.3 $ sudo kvm-ok INFO: /dev/kvm exists KVM acceleration can be used $ 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': 0 amd_iommu_0/cmd_processed/ (33.32%) 2 amd_iommu_0/cmd_processed_inv/ (33.35%) 0 amd_iommu_0/ign_rd_wr_mmio_1ff8h/ (33.39%) 340 amd_iommu_0/int_dte_hit/ (33.43%) 23 amd_iommu_0/int_dte_mis/ (33.44%) 556 amd_iommu_0/mem_dte_hit/ (33.44%) 841,689,151,202,939 amd_iommu_0/mem_dte_mis/ (33.44%) 74 amd_iommu_0/mem_iommu_tlb_pde_hit/ (33.44%) 502 amd_iommu_0/mem_iommu_tlb_pde_mis/ (33.41%) 1,195 amd_iommu_0/mem_iommu_tlb_pte_hit/ (33.36%) 8,017 amd_iommu_0/mem_iommu_tlb_pte_mis/ (33.33%) 0 amd_iommu_0/mem_pass_excl/ (33.29%) 0 amd_iommu_0/mem_pass_pretrans/ (33.28%) 16,504 amd_iommu_0/mem_pass_untrans/ (33.28%) 0 amd_iommu_0/mem_target_abort/ (33.28%) 2,842 amd_iommu_0/mem_trans_total/ (33.28%) 0 amd_iommu_0/page_tbl_read_gst/ (33.28%) 111 amd_iommu_0/page_tbl_read_nst/ (33.29%) 111 amd_iommu_0/page_tbl_read_tot/ (33.28%) 0 amd_iommu_0/smi_blk/ (33.28%) 0 amd_iommu_0/smi_recv/ (33.29%) 0 amd_iommu_0/tlb_inv/ (33.28%) 0 amd_iommu_0/vapic_int_guest/ (33.28%) 345 amd_iommu_0/vapic_int_non_guest/ (33.29%) 10.000799128 seconds time elapsed Results for Ryzen 7 4700U to follow. -- David Coe _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-04-10 8:17 UTC|newest] Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-09 8:58 [PATCH 0/2] iommu/amd: Revert and remove failing PMC test Suravee Suthikulpanit 2021-04-09 8:58 ` Suravee Suthikulpanit 2021-04-09 8:58 ` [PATCH 1/2] Revert "iommu/amd: Fix performance counter initialization" Suravee Suthikulpanit 2021-04-09 8:58 ` Suravee Suthikulpanit 2021-04-09 17:06 ` Shuah Khan 2021-04-09 17:06 ` Shuah Khan 2021-04-13 13:36 ` Suthikulpanit, Suravee 2021-04-13 13:36 ` Suthikulpanit, Suravee 2021-04-09 8:58 ` [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test Suravee Suthikulpanit 2021-04-09 8:58 ` Suravee Suthikulpanit 2021-04-09 16:37 ` Shuah Khan 2021-04-09 16:37 ` Shuah Khan 2021-04-09 17:10 ` Shuah Khan 2021-04-09 17:10 ` Shuah Khan 2021-04-09 20:00 ` Shuah Khan 2021-04-09 20:00 ` Shuah Khan 2021-04-09 20:19 ` Shuah Khan 2021-04-09 20:19 ` Shuah Khan 2021-04-09 20:11 ` David Coe 2021-04-09 20:11 ` David Coe 2021-04-10 8:17 ` David Coe [this message] 2021-04-10 8:17 ` David Coe 2021-04-10 10:03 ` David Coe 2021-04-10 10:03 ` David Coe 2021-04-13 13:51 ` Suthikulpanit, Suravee 2021-04-13 13:51 ` Suthikulpanit, Suravee 2021-04-14 15:33 ` David Coe 2021-04-14 15:33 ` David Coe 2021-04-15 9:28 ` Suthikulpanit, Suravee 2021-04-15 9:28 ` Suthikulpanit, Suravee 2021-04-15 14:39 ` David Coe 2021-04-15 14:39 ` David Coe 2021-04-15 16:20 ` David Coe 2021-04-15 16:20 ` David Coe 2021-04-18 19:16 ` David Coe 2021-04-18 19:16 ` David Coe 2021-04-14 22:18 ` David Coe 2021-04-14 22:18 ` David Coe 2021-04-20 8:38 ` Suthikulpanit, Suravee 2021-04-20 8:38 ` Suthikulpanit, Suravee 2021-04-20 10:33 ` Alexander Monakov 2021-04-20 10:33 ` Alexander Monakov 2021-04-13 9:38 ` David Coe 2021-04-13 9:38 ` David Coe 2021-04-15 13:41 ` [PATCH 0/2] iommu/amd: Revert and remove failing PMC test Joerg Roedel 2021-04-15 13:41 ` Joerg Roedel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=VI1PR09MB2638FACB956277A7CEAAE367C7729@VI1PR09MB2638.eurprd09.prod.outlook.com \ --to=david.coe@live.co.uk \ --cc=1917203@bugs.launchpad.net \ --cc=Jon.Grimm@amd.com \ --cc=amonakov@ispras.ru \ --cc=iommu@lists.linux-foundation.org \ --cc=joro@8bytes.org \ --cc=jsnitsel@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=ml.linux@elloe.vision \ --cc=pmenzel@molgen.mpg.de \ --cc=skhan@linuxfoundation.org \ --cc=suravee.suthikulpanit@amd.com \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.