public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
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 15:36:04 +0100	[thread overview]
Message-ID: <aFQgVPRvbrfcUrkY@J2N7QTR9R3> (raw)
In-Reply-To: <20250619140442.GH1613376@noisy.programming.kicks-ass.net>

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/

... and if NO_INTERRUPT would be better-named as NO_SAMPLING, that might
be a good opportunity to clean that up.

> > 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? :-)

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.

Mark.


  reply	other threads:[~2025-06-19 17:03 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
2025-06-19 14:36         ` Mark Rutland [this message]
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=aFQgVPRvbrfcUrkY@J2N7QTR9R3 \
    --to=mark.rutland@arm.com \
    --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=neil.armstrong@linaro.org \
    --cc=nfraprado@collabora.com \
    --cc=peterz@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox