[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250619144254.GK1613376@noisy.programming.kicks-ass.net>
Date: Thu, 19 Jun 2025 16:42:54 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Mark Rutland <mark.rutland@....com>
Cc: Koichi Okuno <fj2767dz@...itsu.com>, Will Deacon <will@...nel.org>,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel@...ts.infradead.org,
Bjorn Andersson <quic_bjorande@...cinc.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Konrad Dybcio <konradybcio@...nel.org>,
Neil Armstrong <neil.armstrong@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
NĂcolas F. R. A. Prado <nfraprado@...labora.com>,
Thomas Gleixner <tglx@...utronix.de>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/2] perf: Fujitsu: Add the Uncore PCI PMU driver
On Thu, Jun 19, 2025 at 03:36:04PM +0100, Mark Rutland wrote:
> On Thu, Jun 19, 2025 at 04:04:42PM +0200, Peter Zijlstra wrote:
> > 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 :-)
>
> Yeah :)
>
> FWIW, that came to mind due to:
>
> https://lore.kernel.org/lkml/20250618-perf-pmu-cap-docs-v1-1-0d34387d6e47@collabora.com/
Oh hey, look at that.. Clearly that is still stuck in my unread pile :/
> ... and if NO_INTERRUPT would be better-named as NO_SAMPLING, that might
> be a good opportunity to clean that up.
Yeah, that's more or less what it does, look at the few sites in
perf/events/core.c that test it.
> > 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? :-)
>
> I think a few folk likle that live in the nearest hall of mirrors...
>
> If you're happy with that in concept, I can see about getting someone to
> look at that -- the general idea has come up a few times.
Sure.
Powered by blists - more mailing lists