public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@amd.com>
To: David Coe <david.coe@live.co.uk>,
	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: Tue, 13 Apr 2021 20:51:56 +0700	[thread overview]
Message-ID: <add9d575-191e-d7a6-e3e1-dfc7ea7f35c8@amd.com> (raw)
In-Reply-To: <VI1PR09MB26380EED406F2F08ACB6B5BBC7729@VI1PR09MB2638.eurprd09.prod.outlook.com>



On 4/10/2021 5:03 PM, David Coe wrote:
> Results for AMD Ryzen 4700U running Ubuntu 21.04β kernel 5.11.0-13
> 
> $ sudo dmesg | grep IOMMU
> [    0.490352] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
> [    0.491985] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
> [    0.493732] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank).
> [    0.793259] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <jroedel@suse.de>
> 
> ....
> 
> $ 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':
> 
>                 12      amd_iommu_0/cmd_processed/             (33.28%)
>                  6       amd_iommu_0/cmd_processed_inv/        (33.32%)
>                  0       amd_iommu_0/ign_rd_wr_mmio_1ff8h/     (33.36%)
>                290       amd_iommu_0/int_dte_hit/              (33.40%)
>                 20       amd_iommu_0/int_dte_mis/              (33.46%)
>                391       amd_iommu_0/mem_dte_hit/              (33.49%)
>              3,720       amd_iommu_0/mem_dte_mis/              (33.49%)
>                 44       amd_iommu_0/mem_iommu_tlb_pde_hit/    (33.46%)
>                810       amd_iommu_0/mem_iommu_tlb_pde_mis/    (33.45%)
>                 35       amd_iommu_0/mem_iommu_tlb_pte_hit/    (33.41%)
>                746       amd_iommu_0/mem_iommu_tlb_pte_mis/    (33.37%)
>                  0       amd_iommu_0/mem_pass_excl/            (33.32%)
>                  0       amd_iommu_0/mem_pass_pretrans/        (33.28%)
>                  0       amd_iommu_0/mem_pass_untrans/         (33.28%)
>                  0       amd_iommu_0/mem_target_abort/         (33.27%)
>                715       amd_iommu_0/mem_trans_total/          (33.27%)
>                  0       amd_iommu_0/page_tbl_read_gst/        (33.28%)
>                 36       amd_iommu_0/page_tbl_read_nst/        (33.27%)
>                 36       amd_iommu_0/page_tbl_read_tot/        (33.27%)
>                  0       amd_iommu_0/smi_blk/                  (33.28%)
>                  0       amd_iommu_0/smi_recv/                 (33.26%)
>                  0       amd_iommu_0/tlb_inv/                  (33.23%)
>                  0       amd_iommu_0/vapic_int_guest/          (33.24%)
>                366       amd_iommu_0/vapic_int_non_guest/      (33.27%)
> 
> The immediately obvious difference is the with the enormous count seen on mem_dte_mis on the older Ryzen 2400G. Will do some RTFM but anyone with comments and insight?
> 
> 841,689,151,202,939       amd_iommu_0/mem_dte_mis/              (33.44%)
> 
> Otherwise, all seems to running smoothly (especially for a distribution still in β). Bravo and many thanks all!
> 
That doesn't look correct. Lemme do some more investigation also.

Thanks,
Suravee

  reply	other threads:[~2021-04-13 13:52 UTC|newest]

Thread overview: 23+ 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 ` [PATCH 1/2] Revert "iommu/amd: Fix performance counter initialization" Suravee Suthikulpanit
2021-04-09 17:06   ` Shuah Khan
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 16:37   ` Shuah Khan
2021-04-09 17:10     ` Shuah Khan
2021-04-09 20:00   ` Shuah Khan
2021-04-09 20:19     ` Shuah Khan
2021-04-09 20:11   ` David Coe
2021-04-10  8:17   ` David Coe
2021-04-10 10:03   ` David Coe
2021-04-13 13:51     ` Suthikulpanit, Suravee [this message]
2021-04-14 15:33       ` David Coe
2021-04-15  9:28         ` Suthikulpanit, Suravee
2021-04-15 14:39           ` David Coe
2021-04-15 16:20           ` David Coe
2021-04-18 19:16           ` David Coe
2021-04-14 22:18       ` David Coe
2021-04-20  8:38     ` Suthikulpanit, Suravee
2021-04-20 10:33       ` Alexander Monakov
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

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=add9d575-191e-d7a6-e3e1-dfc7ea7f35c8@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=1917203@bugs.launchpad.net \
    --cc=Jon.Grimm@amd.com \
    --cc=amonakov@ispras.ru \
    --cc=david.coe@live.co.uk \
    --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=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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox