From: Peter Zijlstra <peterz@infradead.org>
To: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: namhyung@kernel.org, eranian@google.com, acme@kernel.org,
mark.rutland@arm.com, jolsa@kernel.org, irogers@google.com,
bp@alien8.de, x86@kernel.org, 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 v2 2/3] perf/ibs: Fix interface via core pmu events
Date: Mon, 13 Mar 2023 15:21:56 +0100 [thread overview]
Message-ID: <20230313142156.GL2017917@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <45de7e62-d951-1019-990e-6df285a64cf6@amd.com>
On Mon, Mar 13, 2023 at 05:59:46PM +0530, Ravi Bangoria wrote:
> > Now, we already have a gruesome hack in there, and I'm thikning you
> > should use that instead of adding yet another one. Note:
> >
> > if (ret == -ENOENT && event->attr.type != type && !extended_type) {
> > type = event->attr.type;
> > goto again;
> >
> > So if you have amd_pmu_hw_config() do:
> >
> > event->attr.type = ibs_pmu.type;
> > return -ENOENT;
> >
> > it should all just work no?
>
> IBS driver needs to convert RAW pmu config to IBS config, which it does
> based on original event->attr.type. See perf_ibs_precise_event(). This
> logic will fail with event->attr.type overwrite.
amd_pmu_hw_config() could also rewrite event->attr.config I suppose.
I don't think we actually use/expose these event->attr fields again
after all this, do wel?
The closest to that is perf_event_modify_attr(), but that is limited to
TYPE_BREAKPOINT for the time being (also, could this be used to cure
your in-kernel IBS usage woes?).
next prev parent reply other threads:[~2023-03-13 14:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 10:11 [PATCH v2 0/3] perf/ibs: Fix interface via core pmu events Ravi Bangoria
2023-03-09 10:11 ` [PATCH v2 1/3] perf/ibs: Introduce ibs_core_pmu_event() Ravi Bangoria
2023-03-09 10:11 ` [PATCH v2 2/3] perf/ibs: Fix interface via core pmu events Ravi Bangoria
2023-03-11 0:32 ` Namhyung Kim
2023-03-13 12:35 ` Ravi Bangoria
2023-03-12 14:54 ` Peter Zijlstra
2023-03-13 12:29 ` Ravi Bangoria
2023-03-13 14:21 ` Peter Zijlstra [this message]
2023-03-13 15:40 ` Ravi Bangoria
2023-03-09 10:11 ` [PATCH v2 3/3] perf test: Add selftest to test IBS invocation " 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=20230313142156.GL2017917@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=ananth.narayan@amd.com \
--cc=bp@alien8.de \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=namhyung@kernel.org \
--cc=ravi.bangoria@amd.com \
--cc=sandipan.das@amd.com \
--cc=santosh.shukla@amd.com \
--cc=x86@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