From: Namhyung Kim <namhyung@kernel.org>
To: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: acme@kernel.org, kim.phillips@amd.com, peterz@infradead.org,
	 mingo@redhat.com, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com,  jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	 kan.liang@linux.intel.com, changbin.du@huawei.com,
	yangjihong1@huawei.com,  zwisler@chromium.org,
	wangming01@loongson.cn, chenhuacai@kernel.org,
	 kprateek.nayak@amd.com, linux-perf-users@vger.kernel.org,
	 linux-kernel@vger.kernel.org, sandipan.das@amd.com,
	ananth.narayan@amd.com,  santosh.shukla@amd.com
Subject: Re: [PATCH 1/2] perf tool AMD: Use non-precise cycles as default event on certain Zen2 processors
Date: Fri, 8 Dec 2023 15:33:26 -0800	[thread overview]
Message-ID: <CAM9d7cijrZzp=5m+BcQ77WFOSHT7e5vO-RCUTUp5Pevmz2wbtg@mail.gmail.com> (raw)
In-Reply-To: <f42bf6b7-75b8-124b-c79e-ad7a9b706990@amd.com>
Hi Ravi,
On Fri, Nov 10, 2023 at 1:46 AM Ravi Bangoria <ravi.bangoria@amd.com> wrote:
>
> Hi Namhyung,
>
> >> By default, Perf uses precise cycles event when no explicit event is
> >> specified by user. Precise cycles event is forwarded to ibs_op// pmu
> >> on AMD. However, IBS has hw issue on certain Zen2 processors where
> >> it might raise NMI without sample_valid bit set, which causes Unknown
> >> NMI warnings. (Erratum #1215: IBS (Instruction Based Sampling) Counter
> >> Valid Value May be Incorrect After Exit From Core C6 (CC6) State.) So,
> >> use non-precise cycles as default event on affected processors.
> >
> > It seems like a kernel issue, do we have a kernel patch not to forward
> > precise cycles or instructions events to IBS on the affected CPUs?
>
> I'm not sure how it's a kernel issue. User can use ibs_op// pmu directly
> and might hit the hw bug.
Sorry for the late reply.  I know it's the user's fault when using ibs_op//
directly but I think the kernel should not forward cycles:pp to IBS.
Thanks,
Namhyung
next prev parent reply	other threads:[~2023-12-08 23:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07  8:33 [PATCH 1/2] perf tool AMD: Use non-precise cycles as default event on certain Zen2 processors Ravi Bangoria
2023-11-07  8:33 ` [PATCH 2/2] perf header: Additional note on AMD IBS for max_precise pmu cap Ravi Bangoria
2023-11-09 19:56   ` Arnaldo Carvalho de Melo
2023-11-07 18:22 ` [PATCH 1/2] perf tool AMD: Use non-precise cycles as default event on certain Zen2 processors Ian Rogers
2023-11-10  9:37   ` Ravi Bangoria
2023-11-09 21:53 ` Namhyung Kim
2023-11-10  9:46   ` Ravi Bangoria
2023-12-08 23:33     ` Namhyung Kim [this message]
2023-12-11 13:53       ` Ravi Bangoria
2023-12-11 23:01         ` Namhyung Kim
2023-12-12  4:18           ` Ravi Bangoria
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='CAM9d7cijrZzp=5m+BcQ77WFOSHT7e5vO-RCUTUp5Pevmz2wbtg@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth.narayan@amd.com \
    --cc=changbin.du@huawei.com \
    --cc=chenhuacai@kernel.org \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=kim.phillips@amd.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    --cc=sandipan.das@amd.com \
    --cc=santosh.shukla@amd.com \
    --cc=wangming01@loongson.cn \
    --cc=yangjihong1@huawei.com \
    --cc=zwisler@chromium.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;
as well as URLs for NNTP newsgroup(s).