From: Marc Zyngier <maz@kernel.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
linux-realtek-soc@lists.infradead.org,
"Will Deacon" <will.deacon@arm.com>,
linux-kernel@vger.kernel.org, "Wang YanQing" <udknight@gmail.com>,
linux-soc@vger.kernel.org, "Andreas Färber" <afaerber@suse.de>,
linux-arm-kernel@lists.infradead.org
Subject: Re: perf record doesn't work on rtd129x SoC
Date: Wed, 04 Dec 2019 11:38:15 +0000 [thread overview]
Message-ID: <1892ab83960fbdcdbb49c141577f2c11@www.loen.fr> (raw)
In-Reply-To: <1b2d2bc3-afcf-02c3-ccd6-e2a227c23fd3@arm.com>
On 2019-12-04 11:20, Robin Murphy wrote:
> On 2019-12-04 7:28 am, Andreas Färber wrote:
>> Hi YanQing,
>> + LAKML + Mark + Will
>> Am 04.12.19 um 05:55 schrieb Wang YanQing:
>>> I use "perf record" to debug performance issue on RTD1296 SOC, it
>>> does't work, but
>>> the "perf stat" is ok!
>> Thanks for the report - which board, branch and (base) tag are you
>> testing against? And are you building perf yourself from kernel
>> sources,
>> or are you using some distro package?
>> I only have Busybox in my initrd on DS418; I have not tested perf.
>>
>>> After some dig in the kernel, I find the reason is no pmu overflow
>>> interrupt, I think
>>> below pmu configuration isn't right for RTD1296:
>>> "
>>> arm_pmu: arm-pmu {
>>> compatible = "arm,cortex-a53-pmu";
>>> interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
>>> };
>>> "
>>>
>>> We need 4 PMU SPI for RTD1296 (4 cores), and I guess the 48 isn't
>>> right too.
>> Note that above rtd129x.dtsi snippet is not complete. See
>> rtd1296.dtsi:
>> &arm_pmu {
>> interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
>> };
>
> That doesn't help much, since 4 affinities for one SPI is rather
> nonsensical.
>
>> 48 and high/4 match what I see in the latest BSP:
>>
>> https://github.com/BPI-SINOVOIP/BPI-M4-bsp/blob/master/linux-rtk/arch/arm64/boot/dts/realtek/rtd129x/rtd-1296.dtsi#L116
>>
>>> Any suggestion is welcome.
>>>
>>> Thanks!
>> The only difference I see is "arm,cortex-a53-pmu" vs.
>> "arm,armv8-pmuv3".
>> By my reading of arch/arm64/kernel/perf_event.c the only difference
>> between the two should be the name and an extra cache_map. You could
>> try
>> the other compatible string in your .dts, but I doubt it'll help.
>> Hopefully the Realtek or Arm guys can shed some light.
>
> If the SoC really has all 4 overflow interrupts combined into a
> single SPI line, then sampling just isn't going to be supported -
> it's
> unreasonably difficult to handle overflow when the IRQ may be taken
> on
> the wrong CPU.
Indeed. And I've recently found this exact design blunder on a brand
new
Amlogic SoC, where the per-core interrupts have been OR'd together.
And not just for the PMU! It is the same situation for the GIC, CTI,
and a couple of other things. The only sane interrupts are the timers.
(sound of a PCB hitting the bin...)
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-12-04 11:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191204045559.GA10458@udknight>
2019-12-04 7:28 ` perf record doesn't work on rtd129x SoC Andreas Färber
2019-12-04 11:20 ` Robin Murphy
2019-12-04 11:38 ` Marc Zyngier [this message]
2019-12-04 14:51 ` Robin Murphy
2019-12-09 9:18 ` Wang YanQing
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=1892ab83960fbdcdbb49c141577f2c11@www.loen.fr \
--to=maz@kernel.org \
--cc=afaerber@suse.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-realtek-soc@lists.infradead.org \
--cc=linux-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=udknight@gmail.com \
--cc=will.deacon@arm.com \
/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;
as well as URLs for NNTP newsgroup(s).