All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Coe <david.coe@live.co.uk>
To: "Suthikulpanit, Suravee" <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: Wed, 14 Apr 2021 23:18:00 +0100	[thread overview]
Message-ID: <VI1PR09MB2638CE523F2E7E2DF4A6B087C74E9@VI1PR09MB2638.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <add9d575-191e-d7a6-e3e1-dfc7ea7f35c8@amd.com>

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

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

[-- Attachment #2: 4700U-5.11.0-14.txt --]
[-- Type: text/plain, Size: 5661 bytes --]

$ 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@suse.de>


$ 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



WARNING: multiple messages have this Message-ID (diff)
From: David Coe <david.coe@live.co.uk>
To: "Suthikulpanit, Suravee" <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: Wed, 14 Apr 2021 23:18:00 +0100	[thread overview]
Message-ID: <VI1PR09MB2638CE523F2E7E2DF4A6B087C74E9@VI1PR09MB2638.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <add9d575-191e-d7a6-e3e1-dfc7ea7f35c8@amd.com>

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

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

[-- Attachment #2: 4700U-5.11.0-14.txt --]
[-- Type: text/plain, Size: 5661 bytes --]

$ 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@suse.de>


$ 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



[-- Attachment #3: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2021-04-14 22:18 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
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 [this message]
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=VI1PR09MB2638CE523F2E7E2DF4A6B087C74E9@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: link
Be 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.