RE: [PATCH V1 3/4] perf vendor events: Add JSON metrics for imx8mq DDR Perf
From: Joakim Zhang <hidden>
Date: 2021-01-21 10:41:24
Also in:
linux-arm-kernel
-----Original Message----- From: John Garry <redacted> Sent: 2021年1月20日 17:26 To: Joakim Zhang <redacted>; acme@kernel.org; jolsa@redhat.com Cc: will@kernel.org; linux-perf-users@vger.kernel.org; dl-linux-imx [off-list ref]; mark.rutland@arm.com; linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V1 3/4] perf vendor events: Add JSON metrics for imx8mq DDR Perf On 20/01/2021 05:46, Joakim Zhang wrote:quoted
quoted
-----Original Message----- From: John Garry<redacted> Sent: 2021年1月19日 20:27 To: Joakim Zhang<redacted>;acme@kernel.org; jolsa@redhat.com Cc:will@kernel.org;linux-perf-users@vger.kernel.org; dl-linux-imx [off-list ref];mark.rutland@arm.com; linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V1 3/4] perf vendor events: Add JSON metrics for imx8mq DDR Perf On 19/01/2021 11:00, Joakim Zhang wrote:quoted
quoted
-----Original Message----- From: John Garry<redacted> Sent: 2021年1月19日 18:40 To: Joakim Zhang<redacted>;acme@kernel.org; jolsa@redhat.com Cc:will@kernel.org;linux-perf-users@vger.kernel.org; dl-linux-imx [off-list ref];mark.rutland@arm.com; linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH V1 3/4] perf vendor events: Add JSON metrics for imx8mq DDR Perf On 19/01/2021 02:56, Joakim Zhang wrote:quoted
index 000000000000..c3e9f89a4a4d--- /dev/null +++b/tools/perf/pmu-events/arch/arm64/freescale/imx8mq/sys/metrics.quoted
quoted
quoted
quoted
quoted
+++ js +++ on@@ -0,0 +1,26 @@ +[ + { + "BriefDescription": "bandwidth usage for lpddr4 evk board",Why mention the evk board specifically? Is this metric only specific to that board, and not all i.MX8MQ platforms?Yes, John, we have lpddr4 evk board and ddr4 evk borad......How is this supposed to work? So perf matches on the identifier file for system PMUs; however the contents of this file are based on the HW implementation for imx DDR PMU,not the board.quoted
Yes, I know this feature is for system PMU, not board. You know DDRbandwidth calculation is based on DDR clock frequency, which is vary form boards.quoted
e.g. lpddr4 board, DDR clock frequency is 750MHZ: "MetricExpr": "(( imx8_ddr0@read\\-cycles@ + imx8_ddr0@write\\-cycles@ )* 4 * 4 / duration_time) / (750 * 1000000 * 4 * 4)"quoted
ddr4 board, DDR clock frequency is 600MHZ. "MetricExpr": "(( imx8_ddr0@read\\-cycles@ + imx8_ddr0@write\\-cycles@ )* 4 * 4 / duration_time) / (600 * 1000000 * 4 * 4)"quoted
I give different metric names, "MetricName": "imx8mm_bandwidth_usage.lpddr4" "MetricName": "imx8mm_bandwidth_usage.ddr4"But that is just not how things are done. We - or I - would expect that perf tool would have the intelligence to know the appropriate metric for that specific platform. Or, more specifically, we should not present the user with many metrics and expect him/her to know the appropriate metric for the specific board. Are there other cases for other architectures where things are done like this?
I don't know if exist other cases. If you can’t accept it, I can only push part of it first, and let bandwidth metric locally. Best Regards, Joakim Zhang
Thanks, Johnquoted
So users can select correct bandwidth metric according to their own boardtypes. To a certain extent, it can also support some board-level metrics.quoted
If it is okay for you, I will send a V2 to replace ( imx8_ddr0@read\\-cycles@ +imx8_ddr0@write\\-cycles@ ) with ( imx8mm_ddr.read_cycles + imx8mm_ddr.write_cycles ).quoted
quoted
quoted
John, change to your new framework, I found it can't support all featureswhich is supported in 5.10 kernel. Yes, so let me know about all the problems.It should have worked as 5.10 kernel at my side. Thanks.