From: Peter Zijlstra <peterz@infradead.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "Koichi Okuno" <fj2767dz@fujitsu.com>,
"Will Deacon" <will@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Catalin Marinas" <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org,
"Bjorn Andersson" <quic_bjorande@quicinc.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/2] perf: Fujitsu: Add the Uncore PCI PMU driver
Date: Thu, 19 Jun 2025 16:04:42 +0200 [thread overview]
Message-ID: <20250619140442.GH1613376@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <aFQXU5rK_HJE9zq0@J2N7QTR9R3>
On Thu, Jun 19, 2025 at 02:57:55PM +0100, Mark Rutland wrote:
> On Tue, Jun 17, 2025 at 12:36:18PM +0200, Peter Zijlstra wrote:
> > On Tue, Jun 17, 2025 at 07:27:50PM +0900, Koichi Okuno wrote:
> > > + pcipmu->pmu = (struct pmu) {
> > > + .parent = dev,
> > > + .task_ctx_nr = perf_invalid_context,
> > > +
> > > + .pmu_enable = fujitsu_pci__pmu_enable,
> > > + .pmu_disable = fujitsu_pci__pmu_disable,
> > > + .event_init = fujitsu_pci__event_init,
> > > + .add = fujitsu_pci__event_add,
> > > + .del = fujitsu_pci__event_del,
> > > + .start = fujitsu_pci__event_start,
> > > + .stop = fujitsu_pci__event_stop,
> > > + .read = fujitsu_pci__event_read,
> > > +
> > > + .attr_groups = fujitsu_pci_pmu_attr_grps,
> > > + .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
> >
> > Should these drivers not also have PERF_PMU_CAP_NO_INTERRUPT ? Per them
> > being uncore they cannot generate samples.
>
> These PMUs actually have an interrupt, so that might be a bit confusing.
> That said, the counters seem to be 64-bit, so the interrupt doesn't seem
> practically necessary today.
Yeah, I saw they had an interrupt. But them being uncore they must not
sample, and NO_INTERRUPT means not being able to sample.
Naming urgh :-)
> Either way, the fujitsu_pci__event_init() function rejects sampling
> events, so it correctly rejects sampling events.
>
> IMO, it'd be a bit nicer to do the inverse, and have the perf core
> reject sampling events by default for non-CPU PMUs.
Yeah, there's lots of cleanup to be done. Quite possibly also some
unification between the various drivers.
Just need someone that knows what they're doing that has spare time,
know anybody like that? :-)
next prev parent reply other threads:[~2025-06-19 17:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 10:27 [PATCH v5 0/2] perf: Fujitsu: Add Uncore MAC/PCI PMU driver Koichi Okuno
2025-06-17 10:27 ` [PATCH v5 1/2] perf: Fujitsu: Add the Uncore MAC " Koichi Okuno
2025-06-17 10:27 ` [PATCH v5 2/2] perf: Fujitsu: Add the Uncore PCI " Koichi Okuno
2025-06-17 10:36 ` Peter Zijlstra
2025-06-19 13:57 ` Mark Rutland
2025-06-19 14:04 ` Peter Zijlstra [this message]
2025-06-19 14:36 ` Mark Rutland
2025-06-19 14:42 ` Peter Zijlstra
2025-07-01 6:13 ` Koichi Okuno (Fujitsu)
2025-07-14 13:32 ` Mark Rutland
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=20250619140442.GH1613376@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=dmitry.baryshkov@linaro.org \
--cc=fj2767dz@fujitsu.com \
--cc=geert+renesas@glider.be \
--cc=konradybcio@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=neil.armstrong@linaro.org \
--cc=nfraprado@collabora.com \
--cc=quic_bjorande@quicinc.com \
--cc=tglx@linutronix.de \
--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.