linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Alexander Monakov <amonakov@ispras.ru>, linux-kernel@vger.kernel.org
Cc: Joerg Roedel <joro@8bytes.org>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	iommu@lists.linux-foundation.org, skhan@linuxfoundation.org
Subject: Re: [PATCH] iommu/amd: Fix event counter availability check
Date: Tue, 2 Jun 2020 17:51:59 -0600	[thread overview]
Message-ID: <c0f9f676-eff8-572d-9174-4c22c6095a3d@linuxfoundation.org> (raw)
In-Reply-To: <alpine.LNX.2.20.13.2005311014450.16067@monopod.intra.ispras.ru>

On 5/31/20 1:22 AM, Alexander Monakov wrote:
> Hi,
> 
> Adding Shuah Khan to Cc: I've noticed you've seen this issue on Ryzen 2400GE;
> can you have a look at the patch? Would be nice to know if it fixes the
> problem for you too.
> 

I am not seeing any change in behavior on my system. I still see:

I can't read perf counters.

The question I asked in my previous thread on this:

--------------------------------------------------------------------
I see 2 banks and 4 counters on my system. Is it sufficient to check
the first bank and first counter? In other words, if the first one
isn't writable, are all counters non-writable?

Should we read the config first and then, try to see if any of the
counters are writable? I have a patch that does that, I can send it
out for review.

I changed the logic to read config to get max banks and counters
before checking if counters are writable and tried writing to all.
The result is the same and all of them aren't writable. However,
when disable the writable check and assume they are, I can run

perf stat -e 'amd_iommu_0 on all events and get data.

perf stat -e 'amd_iommu_0/cmd_processed/' sleep 10

  Performance counter stats for 'system wide':

                 56      amd_iommu_0/cmd_processed/

       10.001525171 seconds time elapsed


perf stat -a -e amd_iommu/mem_trans_total/ sleep 10

  Performance counter stats for 'system wide':

              2,696      amd_iommu/mem_trans_total/

       10.001465115 seconds time elapsed

I tried all possible events listed under amd_iommu_0 and I can get
data on all of them. No problems in dmesg.
--------------------------------------------------------------------

This patch doesn't really address that question.

thanks,
-- Shuah

  parent reply	other threads:[~2020-06-02 23:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 20:07 [PATCH] iommu/amd: Fix event counter availability check Alexander Monakov
2020-05-31  7:22 ` Alexander Monakov
2020-06-01  2:48   ` Paul Menzel
2021-02-21 13:44     ` Paul Menzel
2020-06-02 23:51   ` Shuah Khan [this message]
2020-06-03  6:54     ` Alexander Monakov
2021-02-26 21:44       ` Paul Menzel
2021-02-26 21:55         ` Shuah Khan
2020-06-01  7:37 ` Suravee Suthikulpanit
2020-06-01  9:01   ` Alexander Monakov
2020-06-01 15:10     ` Suravee Suthikulpanit
2020-06-01 16:09       ` Alexander Monakov
2020-06-15 20:48       ` Alexander Monakov
2020-06-16  9:35         ` Suravee Suthikulpanit
2020-06-30 19:22           ` Alexander Monakov
2020-09-17 17:55           ` Alexander Monakov
2021-02-21 13:49             ` Paul Menzel
2021-02-22 17:59               ` Suravee Suthikulpanit
2021-02-24 20:35                 ` Paul Menzel

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=c0f9f676-eff8-572d-9174-4c22c6095a3d@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=amonakov@ispras.ru \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suravee.suthikulpanit@amd.com \
    /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;
as well as URLs for NNTP newsgroup(s).