All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm64: rk3399: Add capacity-dmips-mhz attributes
@ 2019-03-02 13:10 ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2019-03-02 13:10 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Lin Huang, Jeffy Chen, Douglas Anderson, linux-rockchip,
	Enric Balletbo i Serra, Robin Murphy, linux-arm-kernel

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.

Tested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 6cc1c9fa4ea6..1e75d9050441 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 = <485>;
 		};
 
 		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 = <485>;
 		};
 
 		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 = <485>;
 		};
 
 		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 = <485>;
 		};
 
 		cpu_b0: cpu@100 {
@@ -119,6 +123,7 @@
 			#cooling-cells = <2>; /* min followed by max */
 			dynamic-power-coefficient = <436>;
 			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <1024>;
 		};
 
 		cpu_b1: cpu@101 {
@@ -130,6 +135,7 @@
 			#cooling-cells = <2>; /* min followed by max */
 			dynamic-power-coefficient = <436>;
 			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <1024>;
 		};
 
 		idle-states {
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] arm64: rk3399: Add capacity-dmips-mhz attributes
@ 2019-03-02 13:10 ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2019-03-02 13:10 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: Lin Huang, Jeffy Chen, Douglas Anderson, linux-rockchip,
	Enric Balletbo i Serra, Robin Murphy, linux-arm-kernel

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.

Tested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 6cc1c9fa4ea6..1e75d9050441 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 = <485>;
 		};
 
 		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 = <485>;
 		};
 
 		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 = <485>;
 		};
 
 		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 = <485>;
 		};
 
 		cpu_b0: cpu@100 {
@@ -119,6 +123,7 @@
 			#cooling-cells = <2>; /* min followed by max */
 			dynamic-power-coefficient = <436>;
 			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <1024>;
 		};
 
 		cpu_b1: cpu@101 {
@@ -130,6 +135,7 @@
 			#cooling-cells = <2>; /* min followed by max */
 			dynamic-power-coefficient = <436>;
 			cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>;
+			capacity-dmips-mhz = <1024>;
 		};
 
 		idle-states {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: rk3399: Add capacity-dmips-mhz attributes
  2019-03-02 13:10 ` Marc Zyngier
@ 2019-03-03 13:35     ` Heiko Stuebner
  -1 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2019-03-03 13:35 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Lin Huang, Jeffy Chen, Douglas Anderson,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Enric Balletbo i Serra, Robin Murphy,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Samstag, 2. März 2019, 14:10:30 CET schrieb Marc Zyngier:
> 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.
> 
> Tested-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> Signed-off-by: Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>

Subject "arm64: dts: rockchip: foobar on rk3399" for the future please :-)
I've fixed that up and applied the patch for 5.2

Thanks
Heiko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm64: rk3399: Add capacity-dmips-mhz attributes
@ 2019-03-03 13:35     ` Heiko Stuebner
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2019-03-03 13:35 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Lin Huang, Jeffy Chen, Douglas Anderson, linux-rockchip,
	Enric Balletbo i Serra, Robin Murphy, linux-arm-kernel

Am Samstag, 2. März 2019, 14:10:30 CET schrieb Marc Zyngier:
> 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.
> 
> Tested-by: Robin Murphy <robin.murphy@arm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

Subject "arm64: dts: rockchip: foobar on rk3399" for the future please :-)
I've fixed that up and applied the patch for 5.2

Thanks
Heiko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-03 13:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-02 13:10 [PATCH v2] arm64: rk3399: Add capacity-dmips-mhz attributes Marc Zyngier
2019-03-02 13:10 ` Marc Zyngier
     [not found] ` <20190302131030.2091-1-marc.zyngier-5wv7dgnIgG8@public.gmane.org>
2019-03-03 13:35   ` Heiko Stuebner
2019-03-03 13:35     ` Heiko Stuebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.