From: "Yoshihiro Furudera (Fujitsu)" <fj5100bi@fujitsu.com>
To: "'Krzysztof Kozlowski'" <krzysztof.kozlowski@linaro.org>,
"Will Deacon" <will@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"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>,
"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>,
"Peter Zijlstra" <peterz@infradead.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/2] perf: Fujitsu: Add the Uncore MAC PMU driver
Date: Tue, 12 Nov 2024 07:49:23 +0000 [thread overview]
Message-ID: <OS3PR01MB69039D08CF87FC69CDE6DD8FD4592@OS3PR01MB6903.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <c50d36ca-2268-4149-8bf0-c44fc1786d9c@linaro.org>
Hi, Krzysztof Kozlowski
Thanks for you review/comments.
>
> On 08/11/2024 06:40, Yoshihiro Furudera wrote:
> > This adds a new dynamic PMU to the Perf Events framework to program
> > and control the Uncore MAC PMUs in Fujitsu chips.
> >
> > This driver was created with reference to drivers/perf/qcom_l3_pmu.c.
> >
> > This driver exports formatting and event information to sysfs so it
> > can be used by the perf user space tools with the syntaxes:
> >
> > perf stat -e mac_iod0_mac0_ch0/ea-mac/ ls perf stat -e
> > mac_iod0_mac0_ch0/event=0x80/ ls
> >
> > FUJITSU-MONAKA Specification URL:
> > https://github.com/fujitsu/FUJITSU-MONAKA
> >
> > Signed-off-by: Yoshihiro Furudera <fj5100bi@fujitsu.com>
> > ---
> > .../admin-guide/perf/fujitsu_mac_pmu.rst | 20 +
> > arch/arm64/configs/defconfig | 1 +
>
>
> defconfig goes via your SoC maintainer. Split the patch and Cc the SoC folks.
Understood.I'll do that and resubmit the patch.
>
> Which ARCH is it, BTW?
This is supported by an ARM64-based processor called FUJITSU-MONAKA,
which is currently being developed by FUJITSU.
>
>
> > drivers/perf/Kconfig | 9 +
> > drivers/perf/Makefile | 1 +
> > drivers/perf/fujitsu_mac_pmu.c | 633
> ++++++++++++++++++
> > include/linux/cpuhotplug.h | 1 +
> > 6 files changed, 665 insertions(+)
> > create mode 100644 Documentation/admin-guide/perf/fujitsu_mac_pmu.rst
> > create mode 100644 drivers/perf/fujitsu_mac_pmu.c
> >
> > diff --git a/Documentation/admin-guide/perf/fujitsu_mac_pmu.rst
> > b/Documentation/admin-guide/perf/fujitsu_mac_pmu.rst
> > new file mode 100644
> > index 000000000000..ddb3dcff3c61
> > --- /dev/null
> > +++ b/Documentation/admin-guide/perf/fujitsu_mac_pmu.rst
> > @@ -0,0 +1,20 @@
> >
> +==================================================
> ===================
> > +====== Fujitsu Uncore MAC Performance Monitoring Unit (PMU)
> >
> +==================================================
> ===================
> > +======
> > +
> > +This driver supports the Uncore MAC PMUs found in Fujitsu chips.
> > +Each MAC PMU on these chips is exposed as a uncore perf PMU with
> > +device name mac_iod<iod>_mac<mac>_ch<ch>.
> > +
> > +The driver provides a description of its available events and
> > +configuration options in sysfs, see
> /sys/bus/event_sources/devices/mac_iod<iod>_mac<mac>_ch<ch>/.
> > +Given that these are uncore PMUs the driver also exposes a "cpumask"
> > +sysfs attribute which contains a mask consisting of one CPU which
> > +will be used to handle all the PMU events.
> > +
> > +Examples for use with perf::
> > +
> > + perf stat -e mac_iod0_mac0_ch0/ea-mac/ ls
> > +
> > +Given that these are uncore PMUs the driver does not support
> > +sampling, therefore "perf record" will not work. Per-task perf sessions are not
> supported.
> > diff --git a/arch/arm64/configs/defconfig
> > b/arch/arm64/configs/defconfig index 5fdbfea7a5b2..2ef412937228 100644
> > --- a/arch/arm64/configs/defconfig
> > +++ b/arch/arm64/configs/defconfig
> > @@ -1575,6 +1575,7 @@ CONFIG_ARM_CMN=m
> CONFIG_ARM_SMMU_V3_PMU=m
> > CONFIG_ARM_DSU_PMU=m CONFIG_FSL_IMX8_DDR_PMU=m
> > +CONFIG_FUJITSU_MAC_PMU=y
> > CONFIG_QCOM_L2_PMU=y
> > CONFIG_QCOM_L3_PMU=y
> > CONFIG_ARM_SPE_PMU=m
> > diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig index
> > bab8ba64162f..4705c605e286 100644
> > --- a/drivers/perf/Kconfig
> > +++ b/drivers/perf/Kconfig
> > @@ -178,6 +178,15 @@ config FSL_IMX9_DDR_PMU
> > can give information about memory throughput and other related
> > events.
> >
> > +config FUJITSU_MAC_PMU
> > + bool "Fujitsu Uncore MAC PMU"
> > + depends on (ARM64 && ACPI) || (COMPILE_TEST && 64BIT)
>
> Missing depends on specific ARCH.
This is because this driver supports the FUJITSU-MONAKA,
which is an ARM64 and ACPI-based processor.
>
> Sorry, this looks like work for some out of tree arch support. I don't think we have
> any interest in taking it... unless it is part of bigger patchset/work? If so, then
> provide *lore* link to relevant patchset.
It is determined by the ACPI ID and does not depend on other patches.
(This ACPI ID is used by FUJITSU-MONAKA.)
The URLs of other patches related to FUJITSU-MONAKA are as follows:
https://lore.kernel.org/all/20241018015640.2924794-1-fj5100bi@fujitsu.com/
https://lore.kernel.org/all/20241024071553.3073864-1-fj5100bi@fujitsu.com/
https://lore.kernel.org/all/20241111064843.3003093-1-fj5100bi@fujitsu.com/
>
> Best regards,
> Krzysztof
>
> On 08/11/2024 12:03, Krzysztof Kozlowski wrote:
> > On 08/11/2024 06:40, Yoshihiro Furudera wrote:
> >> This adds a new dynamic PMU to the Perf Events framework to program
> >> and control the Uncore MAC PMUs in Fujitsu chips.
> >>
> >> This driver was created with reference to drivers/perf/qcom_l3_pmu.c.
>
> This confused me...
This driver was created based on drivers/perf/qcom_l3_pmu.c.
The reason is that the processing done to Qualcomm's L3 cache PMU registers in
qcom_l3_pmu.c is similar to the processing done to the Uncore MAC/PCI PMU registers.
Specifically, the basic processing is the same as drivers/perf/qcom_l3_pmu.c,
but the variable names, function names, ACPI device ID, and some processing have
been modified to match FUJITSU-MONAKA's Uncore MAC PMU.
>
> >> CONFIG_ARM_SPE_PMU=m
> >> diff --git a/drivers/perf/Kconfig b/drivers/perf/Kconfig index
> >> bab8ba64162f..4705c605e286 100644
> >> --- a/drivers/perf/Kconfig
> >> +++ b/drivers/perf/Kconfig
> >> @@ -178,6 +178,15 @@ config FSL_IMX9_DDR_PMU
> >> can give information about memory throughput and other related
> >> events.
> >>
> >> +config FUJITSU_MAC_PMU
> >> + bool "Fujitsu Uncore MAC PMU"
> >> + depends on (ARM64 && ACPI) || (COMPILE_TEST && 64BIT)
> >
> > Missing depends on specific ARCH.
> >
> > Sorry, this looks like work for some out of tree arch support. I don't
> > think we have any interest in taking it... unless it is part of bigger
> > patchset/work? If so, then provide *lore* link to relevant patchset.
> >
>
> -ENOTENOUGHCOFFEE, I see now ACPI dependency so there will be no SoC
> folks for this, right? Then anyway split work per subsystem and send
> defconfig to Soc maintainers.
Yes, we only use ACPI ID.
I'll do that and resubmit the patch.
> Best regards,
> Krzysztof
Best Regards,
Yoshihiro Furudera
next prev parent reply other threads:[~2024-11-12 7:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 5:40 [PATCH 0/2] perf: Fujitsu: Add Uncore MAC/PCI " Yoshihiro Furudera
2024-11-08 5:40 ` [PATCH 1/2] perf: Fujitsu: Add the Uncore MAC " Yoshihiro Furudera
2024-11-08 11:03 ` Krzysztof Kozlowski
2024-11-08 11:08 ` Krzysztof Kozlowski
2024-11-12 7:49 ` Yoshihiro Furudera (Fujitsu) [this message]
2024-11-08 14:19 ` Jonathan Cameron
2024-11-15 1:18 ` Yoshihiro Furudera (Fujitsu)
2024-12-11 11:12 ` Jonathan Cameron
2024-11-08 20:19 ` kernel test robot
2024-11-09 0:36 ` kernel test robot
2024-11-08 5:40 ` [PATCH 2/2] perf: Fujitsu: Add the Uncore PCI " Yoshihiro Furudera
2024-11-08 11:03 ` Krzysztof Kozlowski
2024-11-08 22:33 ` kernel test robot
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=OS3PR01MB69039D08CF87FC69CDE6DD8FD4592@OS3PR01MB6903.jpnprd01.prod.outlook.com \
--to=fj5100bi@fujitsu.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=dmitry.baryshkov@linaro.org \
--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=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
all inboxes | Powered by JetHome®