From: Mark Rutland <mark.rutland@arm.com>
To: "Koichi Okuno (Fujitsu)" <fj2767dz@fujitsu.com>
Cc: "'Peter Zijlstra'" <peterz@infradead.org>,
"Will Deacon" <will@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Bjorn Andersson" <quic_bjorande@quicinc.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@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-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 2/2] perf: Fujitsu: Add the Uncore PCI PMU driver
Date: Mon, 14 Jul 2025 14:32:31 +0100 [thread overview]
Message-ID: <aHUG78Vv1QU5Aafj@J2N7QTR9R3> (raw)
In-Reply-To: <TYCPR01MB67177BF90FEBAB9E20463012C141A@TYCPR01MB6717.jpnprd01.prod.outlook.com>
On Tue, Jul 01, 2025 at 06:13:57AM +0000, Koichi Okuno (Fujitsu) wrote:
> Hi, Peter
>
> Sorry for the late reply.
>
> > 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.
>
> Even now, the fujitsu_pci__event_init() function rejects sampling events
> before checking PERF_PMU_CAP_NO_INTERRUPT in core.c.
> However, I think it is correct to have PERF_PMU_CAP_NO_INTERRUPT which
> means not being able to sample, so I will add NO_INTERRUPT in the next
> version.
Sorry to give contradictory feeback, but given that the majority of PMU
drivers under drivers/perf/ don't set PERF_PMU_CAP_NO_INTERRUPT, and
explicitly reject sampling events, I'd prefer to do the same for
consistency.
Peter, are you happy with that for now?
Overall it would be better for PMUs to export a positive "I support
sampling" flag, and maybe rename/replace PERF_PMU_CAP_NO_INTERRUPT
accordingly, which I'd be happy to look at in future.
Mark.
prev parent reply other threads:[~2025-07-14 13:43 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
2025-06-19 14:42 ` Peter Zijlstra
2025-07-01 6:13 ` Koichi Okuno (Fujitsu)
2025-07-14 13:32 ` Mark Rutland [this message]
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=aHUG78Vv1QU5Aafj@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=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