* [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes @ 2019-02-24 14:35 Marc Zyngier 2019-02-24 20:07 ` Robin Murphy 0 siblings, 1 reply; 6+ messages in thread From: Marc Zyngier @ 2019-02-24 14:35 UTC (permalink / raw) To: Heiko Stuebner Cc: Lin Huang, Jeffy Chen, Douglas Anderson, linux-rockchip, Enric Balletbo i Serra, 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. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> --- 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>; }; 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>; + capacity-dmips-mhz = <1024>; }; cpu_b1: cpu@101 { @@ -130,6 +134,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] 6+ messages in thread
* Re: [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes 2019-02-24 14:35 [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes Marc Zyngier @ 2019-02-24 20:07 ` Robin Murphy 2019-02-24 21:06 ` Marc Zyngier 0 siblings, 1 reply; 6+ messages in thread From: Robin Murphy @ 2019-02-24 20:07 UTC (permalink / raw) To: Marc Zyngier, Heiko Stuebner Cc: Lin Huang, Jeffy Chen, Douglas Anderson, linux-rockchip, Enric Balletbo i Serra, linux-arm-kernel Hi Marc, On 2019-02-24 2:35 pm, Marc Zyngier wrote: > 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 <marc.zyngier@arm.com> > --- > 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. > }; > > 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. 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 :) With the nits fixed, Tested-by: Robin Murphy <robin.murphy@arm.com> Cheers, Robin. > + capacity-dmips-mhz = <1024>; > }; > > cpu_b1: cpu@101 { > @@ -130,6 +134,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 { > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes 2019-02-24 20:07 ` Robin Murphy @ 2019-02-24 21:06 ` Marc Zyngier [not found] ` <20190224210657.2cb54039-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Marc Zyngier @ 2019-02-24 21:06 UTC (permalink / raw) To: Robin Murphy Cc: Heiko Stuebner, Jeffy Chen, Douglas Anderson, linux-rockchip, Enric Balletbo i Serra, linux-arm-kernel, Lin Huang On Sun, 24 Feb 2019 20:07:49 +0000 Robin Murphy <robin.murphy@arm.com> wrote: Hi Robin, > Hi Marc, > > On 2019-02-24 2:35 pm, Marc Zyngier wrote: > > 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 <marc.zyngier@arm.com> > > --- > > 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. > > }; > > > 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20190224210657.2cb54039-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org>]
* Re: [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes [not found] ` <20190224210657.2cb54039-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org> @ 2019-03-02 12:39 ` Heiko Stuebner 2019-03-02 13:11 ` Marc Zyngier 0 siblings, 1 reply; 6+ messages in thread From: Heiko Stuebner @ 2019-03-02 12:39 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 Hi Marc, Am Sonntag, 24. Februar 2019, 22:06:57 CET schrieb Marc Zyngier: > On Sun, 24 Feb 2019 20:07:49 +0000 > Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> wrote: [...] > > With the nits fixed, > > > > Tested-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> > > Cheers Robin. I'll post a v2 after -rc1. You can do that earlier as well, if you want to get it off your plate :-) I'm normally not pausing patches over the merge-window, so from my side there is no need to wait for rc1. Heiko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes 2019-03-02 12:39 ` Heiko Stuebner @ 2019-03-02 13:11 ` Marc Zyngier [not found] ` <20190302131122.4d82da1b-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Marc Zyngier @ 2019-03-02 13:11 UTC (permalink / raw) To: Heiko Stuebner Cc: Lin Huang, Jeffy Chen, Douglas Anderson, linux-rockchip, Enric Balletbo i Serra, Robin Murphy, linux-arm-kernel On Sat, 2 Mar 2019 13:39:38 +0100 Heiko Stuebner <heiko@sntech.de> wrote: Hi Heiko, > Hi Marc, > > Am Sonntag, 24. Februar 2019, 22:06:57 CET schrieb Marc Zyngier: > > On Sun, 24 Feb 2019 20:07:49 +0000 > > Robin Murphy <robin.murphy@arm.com> wrote: > > [...] > > > > With the nits fixed, > > > > > > Tested-by: Robin Murphy <robin.murphy@arm.com> > > > > Cheers Robin. I'll post a v2 after -rc1. > > You can do that earlier as well, if you want to get it off your plate :-) > I'm normally not pausing patches over the merge-window, so from > my side there is no need to wait for rc1. Your wish is my command! ;-) v2 on its way. Thanks, M. -- Without deviation from the norm, progress is not possible. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20190302131122.4d82da1b-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org>]
* Re: [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes [not found] ` <20190302131122.4d82da1b-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org> @ 2019-03-02 14:10 ` Heiko Stuebner 0 siblings, 0 replies; 6+ messages in thread From: Heiko Stuebner @ 2019-03-02 14:10 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:11:22 CET schrieb Marc Zyngier: > On Sat, 2 Mar 2019 13:39:38 +0100 > Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org> wrote: > > Hi Heiko, > > > Hi Marc, > > > > Am Sonntag, 24. Februar 2019, 22:06:57 CET schrieb Marc Zyngier: > > > On Sun, 24 Feb 2019 20:07:49 +0000 > > > Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> wrote: > > > > [...] > > > > > > With the nits fixed, > > > > > > > > Tested-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org> > > > > > > Cheers Robin. I'll post a v2 after -rc1. > > > > You can do that earlier as well, if you want to get it off your plate :-) > > I'm normally not pausing patches over the merge-window, so from > > my side there is no need to wait for rc1. > > Your wish is my command! ;-) v2 on its way. that even worked without sudo :-P [0] ... I need to remember that for when we run into each other the next time. [0] https://xkcd.com/149/ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-02 14:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-24 14:35 [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes Marc Zyngier
2019-02-24 20:07 ` Robin Murphy
2019-02-24 21:06 ` Marc Zyngier
[not found] ` <20190224210657.2cb54039-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org>
2019-03-02 12:39 ` Heiko Stuebner
2019-03-02 13:11 ` Marc Zyngier
[not found] ` <20190302131122.4d82da1b-Fmn/x+r+pSA9//JtdbceeD8Kkb2uy4ct@public.gmane.org>
2019-03-02 14:10 ` Heiko Stuebner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox