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: Thu, 15 Apr 2021 17:20:31 +0100	[thread overview]
Message-ID: <VI1PR09MB263873B89C6CF4D557F811C5C74D9@VI1PR09MB2638.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <df6c8363-baac-5d97-5b06-4bcd3163f83d@amd.com>

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

Hi Suravee!

On 15/04/2021 10:28, Suthikulpanit, Suravee wrote:
> David,
> 
> On 4/14/2021 10:33 PM, David Coe wrote:
>> Hi Suravee!
>>
>> I've re-run your revert+update patch on Ubuntu's latest kernel 
>> 5.11.0-14 partly to check my mailer's 'mangling' hadn't also reached 
>> the code!
>>
>> There are 3 sets of results in the attachment, all for the Ryzen 
>> 2400G. The as-distributed kernel already incorporates your IOMMU RFCv3 
>> patch.
>>
>> A. As-distributed kernel (cold boot)
>>     >5 retries, so no IOMMU read/write capability, no amd_iommu events.
>>
>> B. As-distributed kernel (warm boot)
>>     <5 retries, amd_iommu running stats show large numbers as before.
>>
>> C. Revert+Update kernel
>>     amd_iommu events listed and also show large hit/miss numbers.
>>
>> In due course, I'll load the new (revert+update) kernel on the 4700G 
>> but won't overload your mail-box unless something unusual turns up.
>>
>> Best regards,
>>
> 
> 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).
> 
> Thanks,

Herewith similar one-at-a-time perf stat results for the Ryzen 4700U. As 
before, more than 8 events displays the third (%) column and (sometimes) 
'silly' numbers in the first column.

-- 
David

[-- Attachment #2: EventList-4700U.txt --]
[-- Type: text/plain, Size: 5650 bytes --]

$ sudo ./iommu_list.sh

 Performance counter stats for 'system wide':

                20      amd_iommu_0/cmd_processed/

      10.003010666 seconds time elapsed


 Performance counter stats for 'system wide':

                 5       amd_iommu_0/cmd_processed_inv/

      10.002349464 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/ign_rd_wr_mmio_1ff8h/

      10.002386129 seconds time elapsed


 Performance counter stats for 'system wide':

               325       amd_iommu_0/int_dte_hit/

      10.002346630 seconds time elapsed


 Performance counter stats for 'system wide':

                 2       amd_iommu_0/int_dte_mis/

      10.002365656 seconds time elapsed


 Performance counter stats for 'system wide':

               356       amd_iommu_0/mem_dte_hit/

      10.002426866 seconds time elapsed


 Performance counter stats for 'system wide':

             3,955       amd_iommu_0/mem_dte_mis/

      10.002729058 seconds time elapsed


 Performance counter stats for 'system wide':

                 4       amd_iommu_0/mem_iommu_tlb_pde_hit/

      10.002422610 seconds time elapsed


 Performance counter stats for 'system wide':

             1,326       amd_iommu_0/mem_iommu_tlb_pde_mis/

      10.002397045 seconds time elapsed


 Performance counter stats for 'system wide':

             1,009       amd_iommu_0/mem_iommu_tlb_pte_hit/

      10.002445347 seconds time elapsed


 Performance counter stats for 'system wide':

             1,072       amd_iommu_0/mem_iommu_tlb_pte_mis/

      10.002414734 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/mem_pass_excl/

      10.002435482 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/mem_pass_pretrans/

      10.002409956 seconds time elapsed


 Performance counter stats for 'system wide':

             3,405       amd_iommu_0/mem_pass_untrans/

      10.002563812 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/mem_target_abort/

      10.002473657 seconds time elapsed


 Performance counter stats for 'system wide':

             1,311       amd_iommu_0/mem_trans_total/

      10.002471787 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/page_tbl_read_gst/

      10.002216033 seconds time elapsed


 Performance counter stats for 'system wide':

           276,609       amd_iommu_0/page_tbl_read_nst/

      10.002029261 seconds time elapsed


 Performance counter stats for 'system wide':

           126,161       amd_iommu_0/page_tbl_read_tot/

      10.003569029 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/smi_blk/

      10.001871818 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/smi_recv/

      10.002212891 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/tlb_inv/

      10.002396606 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/vapic_int_guest/

      10.002435308 seconds time elapsed


 Performance counter stats for 'system wide':

               340       amd_iommu_0/vapic_int_non_guest/

      10.002405868 seconds time elapsed


$ sudo perf stat -e '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/' sleep 10

 Performance counter stats for 'system wide':

               345       amd_iommu_0/mem_dte_hit/
               606       amd_iommu_0/mem_dte_mis/
                10       amd_iommu_0/mem_iommu_tlb_pde_hit/
               910       amd_iommu_0/mem_iommu_tlb_pde_mis/
               140       amd_iommu_0/mem_iommu_tlb_pte_hit/
               797       amd_iommu_0/mem_iommu_tlb_pte_mis/

      10.002553966 seconds time elapsed


$ sudo perf stat -e '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/' sleep 10

 Performance counter stats for 'system wide':

               340       amd_iommu_0/mem_dte_hit/                                     (72.65%)
               389       amd_iommu_0/mem_dte_mis/                                     (72.67%)
                 8       amd_iommu_0/mem_iommu_tlb_pde_hit/                           (72.71%)
               849       amd_iommu_0/mem_iommu_tlb_pde_mis/                           (72.76%)
                96       amd_iommu_0/mem_iommu_tlb_pte_hit/                           (72.78%)
               742       amd_iommu_0/mem_iommu_tlb_pte_mis/                           (72.75%)
                 0       amd_iommu_0/mem_pass_excl/                                   (72.76%)
                 0       amd_iommu_0/mem_pass_pretrans/                               (72.76%)
                 6       amd_iommu_0/mem_pass_untrans/                                (72.77%)
                 0       amd_iommu_0/mem_target_abort/                                (72.71%)
             1,122       amd_iommu_0/mem_trans_total/                                 (72.69%)

      10.002471480 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: Thu, 15 Apr 2021 17:20:31 +0100	[thread overview]
Message-ID: <VI1PR09MB263873B89C6CF4D557F811C5C74D9@VI1PR09MB2638.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <df6c8363-baac-5d97-5b06-4bcd3163f83d@amd.com>

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

Hi Suravee!

On 15/04/2021 10:28, Suthikulpanit, Suravee wrote:
> David,
> 
> On 4/14/2021 10:33 PM, David Coe wrote:
>> Hi Suravee!
>>
>> I've re-run your revert+update patch on Ubuntu's latest kernel 
>> 5.11.0-14 partly to check my mailer's 'mangling' hadn't also reached 
>> the code!
>>
>> There are 3 sets of results in the attachment, all for the Ryzen 
>> 2400G. The as-distributed kernel already incorporates your IOMMU RFCv3 
>> patch.
>>
>> A. As-distributed kernel (cold boot)
>>     >5 retries, so no IOMMU read/write capability, no amd_iommu events.
>>
>> B. As-distributed kernel (warm boot)
>>     <5 retries, amd_iommu running stats show large numbers as before.
>>
>> C. Revert+Update kernel
>>     amd_iommu events listed and also show large hit/miss numbers.
>>
>> In due course, I'll load the new (revert+update) kernel on the 4700G 
>> but won't overload your mail-box unless something unusual turns up.
>>
>> Best regards,
>>
> 
> 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).
> 
> Thanks,

Herewith similar one-at-a-time perf stat results for the Ryzen 4700U. As 
before, more than 8 events displays the third (%) column and (sometimes) 
'silly' numbers in the first column.

-- 
David

[-- Attachment #2: EventList-4700U.txt --]
[-- Type: text/plain, Size: 5650 bytes --]

$ sudo ./iommu_list.sh

 Performance counter stats for 'system wide':

                20      amd_iommu_0/cmd_processed/

      10.003010666 seconds time elapsed


 Performance counter stats for 'system wide':

                 5       amd_iommu_0/cmd_processed_inv/

      10.002349464 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/ign_rd_wr_mmio_1ff8h/

      10.002386129 seconds time elapsed


 Performance counter stats for 'system wide':

               325       amd_iommu_0/int_dte_hit/

      10.002346630 seconds time elapsed


 Performance counter stats for 'system wide':

                 2       amd_iommu_0/int_dte_mis/

      10.002365656 seconds time elapsed


 Performance counter stats for 'system wide':

               356       amd_iommu_0/mem_dte_hit/

      10.002426866 seconds time elapsed


 Performance counter stats for 'system wide':

             3,955       amd_iommu_0/mem_dte_mis/

      10.002729058 seconds time elapsed


 Performance counter stats for 'system wide':

                 4       amd_iommu_0/mem_iommu_tlb_pde_hit/

      10.002422610 seconds time elapsed


 Performance counter stats for 'system wide':

             1,326       amd_iommu_0/mem_iommu_tlb_pde_mis/

      10.002397045 seconds time elapsed


 Performance counter stats for 'system wide':

             1,009       amd_iommu_0/mem_iommu_tlb_pte_hit/

      10.002445347 seconds time elapsed


 Performance counter stats for 'system wide':

             1,072       amd_iommu_0/mem_iommu_tlb_pte_mis/

      10.002414734 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/mem_pass_excl/

      10.002435482 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/mem_pass_pretrans/

      10.002409956 seconds time elapsed


 Performance counter stats for 'system wide':

             3,405       amd_iommu_0/mem_pass_untrans/

      10.002563812 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/mem_target_abort/

      10.002473657 seconds time elapsed


 Performance counter stats for 'system wide':

             1,311       amd_iommu_0/mem_trans_total/

      10.002471787 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/page_tbl_read_gst/

      10.002216033 seconds time elapsed


 Performance counter stats for 'system wide':

           276,609       amd_iommu_0/page_tbl_read_nst/

      10.002029261 seconds time elapsed


 Performance counter stats for 'system wide':

           126,161       amd_iommu_0/page_tbl_read_tot/

      10.003569029 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/smi_blk/

      10.001871818 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/smi_recv/

      10.002212891 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/tlb_inv/

      10.002396606 seconds time elapsed


 Performance counter stats for 'system wide':

                 0       amd_iommu_0/vapic_int_guest/

      10.002435308 seconds time elapsed


 Performance counter stats for 'system wide':

               340       amd_iommu_0/vapic_int_non_guest/

      10.002405868 seconds time elapsed


$ sudo perf stat -e '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/' sleep 10

 Performance counter stats for 'system wide':

               345       amd_iommu_0/mem_dte_hit/
               606       amd_iommu_0/mem_dte_mis/
                10       amd_iommu_0/mem_iommu_tlb_pde_hit/
               910       amd_iommu_0/mem_iommu_tlb_pde_mis/
               140       amd_iommu_0/mem_iommu_tlb_pte_hit/
               797       amd_iommu_0/mem_iommu_tlb_pte_mis/

      10.002553966 seconds time elapsed


$ sudo perf stat -e '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/' sleep 10

 Performance counter stats for 'system wide':

               340       amd_iommu_0/mem_dte_hit/                                     (72.65%)
               389       amd_iommu_0/mem_dte_mis/                                     (72.67%)
                 8       amd_iommu_0/mem_iommu_tlb_pde_hit/                           (72.71%)
               849       amd_iommu_0/mem_iommu_tlb_pde_mis/                           (72.76%)
                96       amd_iommu_0/mem_iommu_tlb_pte_hit/                           (72.78%)
               742       amd_iommu_0/mem_iommu_tlb_pte_mis/                           (72.75%)
                 0       amd_iommu_0/mem_pass_excl/                                   (72.76%)
                 0       amd_iommu_0/mem_pass_pretrans/                               (72.76%)
                 6       amd_iommu_0/mem_pass_untrans/                                (72.77%)
                 0       amd_iommu_0/mem_target_abort/                                (72.71%)
             1,122       amd_iommu_0/mem_trans_total/                                 (72.69%)

      10.002471480 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-15 16:20 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 [this message]
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=VI1PR09MB263873B89C6CF4D557F811C5C74D9@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.