Thread (6 messages) flat view 6 messages, 3 authors, 2019-03-02

Re: [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes

From: Marc Zyngier <hidden>
Date: 2019-02-24 21:07:11
Also in: linux-rockchip

On Sun, 24 Feb 2019 20:07:49 +0000
Robin Murphy [off-list ref] wrote:

Hi Robin,
Hi Marc,

On 2019-02-24 2:35 pm, Marc Zyngier wrote:
quoted
The RK3399 has the interesting property to be a so called "big-little"
system, where not all the CPUs are equal (the A53s are much weaker
than the A72s).

So far, we're not telling the OS that there is such a difference in
processing capacity, and Linux assumes that they are equal. Too bad.

Let's tell the OS about this by using the capacity-dmips-mhz
property. The values used here are those used on the Juno platform,
which is quite similar. This leads to the scheduler knowing that
it can pack more tasks on the A72s, and leads to a better interactive
experience.

Signed-off-by: Marc Zyngier <redacted>
---
  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 6cc1c9fa4ea6..7eab31184aee 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -75,6 +75,7 @@
  			#cooling-cells = <2>; /* min followed by max */
  			dynamic-power-coefficient = <100>;
  			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <578>;  
Probably better to use the value from Juno r2 (485) which should more
appropriately represent A53 vs. A72, rather than A53 vs. A57.
Indeed. Although I doubt that there is such a difference between A57
and A72, but I guess it won't really show.
quoted
  		};  
  >   		cpu_l1: cpu@1 {  
@@ -86,6 +87,7 @@
  			#cooling-cells = <2>; /* min followed by
max */ dynamic-power-coefficient = <100>;
  			cpu-idle-states = <&CPU_SLEEP
&CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <578>;
  		};  
  >   		cpu_l2: cpu@2 {  
@@ -97,6 +99,7 @@
  			#cooling-cells = <2>; /* min followed by
max */ dynamic-power-coefficient = <100>;
  			cpu-idle-states = <&CPU_SLEEP
&CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <578>;
  		};  
  >   		cpu_l3: cpu@3 {  
@@ -108,6 +111,7 @@
  			#cooling-cells = <2>; /* min followed by
max */ dynamic-power-coefficient = <100>;
  			cpu-idle-states = <&CPU_SLEEP
&CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <578>;
  		};  
  >   		cpu_b0: cpu@100 {  
@@ -118,7 +122,7 @@
  			clocks = <&cru ARMCLKB>;
  			#cooling-cells = <2>; /* min followed by
max */ dynamic-power-coefficient = <436>;
-			cpu-idle-states = <&CPU_SLEEP
&CLUSTER_SLEEP>;  
Oops.
Gahhhh! Rebase fail. What an idiot. Thanks for spotting this!
Otherwise, though, I was on the verge of tackling this myself now
that my 3399 board is building its own kernels - annoyance at the
linking bottleneck steadfastly refusing to move off CPU0 (except
occasionally to another little core) has been growing steadily :)
Yeah, tell me about it. I still regularly build the kernel on my kevin,
and while the compilation time is reasonable for this kind of device
(and the storage media being an sdcard), the linking is just a pig.
Even on the A72.
With the nits fixed,

Tested-by: Robin Murphy <robin.murphy@arm.com>
Cheers Robin. I'll post a v2 after -rc1.

	M.
-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help