Message ID | 20231103105440.23904-1-quic_anshar@quicinc.com |
---|---|
State | Superseded |
Headers | show |
Series | [v2] arm64: dts: qcom: sc7280: Add capacity and DPC properties | expand |
On 11/3/23 11:54, Ankit Sharma wrote: > The "capacity-dmips-mhz" and "dynamic-power-coefficient" are > used to build Energy Model which in turn is used by EAS to take > placement decisions. So add it to SC7280 soc. > > Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com> > ---Hi, thanks for this patch Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> I performed a quick grep in arch/arm64/boot/dts/qcom and noticed that at least one of these values is missing for: rg -l --files-without-match dynamic-power-coeff $(rg cpu@ -l) | sort ipq5018.dtsi (homogeneous cluster) ipq5332.dtsi (homogeneous cluster) ipq6018.dtsi (homogeneous cluster) ipq8074.dtsi (homogeneous cluster) ipq9574.dtsi (homogeneous cluster) msm8916.dtsi (homogeneous cluster) msm8939.dtsi msm8953.dtsi msm8976.dtsi msm8994.dtsi msm8996.dtsi msm8998.dtsi qcs404.dtsi (homogeneous cluster) qdu1000.dtsi (homogeneous cluster) sa8775p.dtsi sc7280.dtsi sc8180x.dtsi sc8280xp.dtsi sdm630.dtsi sm4450.dtsi sm6125.dtsi sm6375.dtsi sm8350.dtsi sm8450.dtsi rg -l --files-without-match capacity-dmips $(rg cpu@ -l) | sort ipq5018.dtsi (homogeneous cluster) ipq5332.dtsi (homogeneous cluster) ipq6018.dtsi (homogeneous cluster) ipq8074.dtsi (homogeneous cluster) ipq9574.dtsi (homogeneous cluster) msm8916.dtsi (homogeneous cluster) msm8939.dtsi msm8994.dtsi qcs404.dtsi (homogeneous cluster) qdu1000.dtsi (homogeneous cluster) sa8775p.dtsi sc7280.dtsi sm4450.dtsi sm6375.dtsi sm8350.dtsi sm8450.dtsi Where platforms with a single, homogeneous cluster likely don't benefit from EAS.. Is there any chance you could dig up the correct values, for at least some of these platforms? Or would you know whom to ask? FWIW the one we're missing the most is sc8280xp.. Konrad
Hi, On Fri, Nov 3, 2023 at 3:54 AM Ankit Sharma <quic_anshar@quicinc.com> wrote: > > The "capacity-dmips-mhz" and "dynamic-power-coefficient" are > used to build Energy Model which in turn is used by EAS to take > placement decisions. So add it to SC7280 soc. > > Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com> > --- > changes in v2: https://lore.kernel.org/all/20231103095358.29312-1-quic_anshar@quicinc.com/ > - updated commit message and subject. > > arch/arm64/boot/dts/qcom/sc7280.dtsi | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi > index 8601253aec70..b1890824188c 100644 > --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi > @@ -176,6 +176,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_0>; > operating-points-v2 = <&cpu0_opp_table>; > + capacity-dmips-mhz = <1024>; > + dynamic-power-coefficient = <100>; > interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, > <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; > qcom,freq-domain = <&cpufreq_hw 0>; > @@ -204,6 +206,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_100>; > operating-points-v2 = <&cpu0_opp_table>; > + capacity-dmips-mhz = <1024>; > + dynamic-power-coefficient = <100>; > interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, > <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; > qcom,freq-domain = <&cpufreq_hw 0>; > @@ -227,6 +231,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_200>; > operating-points-v2 = <&cpu0_opp_table>; > + capacity-dmips-mhz = <1024>; > + dynamic-power-coefficient = <100>; > interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, > <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; > qcom,freq-domain = <&cpufreq_hw 0>; > @@ -250,6 +256,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_300>; > operating-points-v2 = <&cpu0_opp_table>; > + capacity-dmips-mhz = <1024>; > + dynamic-power-coefficient = <100>; > interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, > <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; > qcom,freq-domain = <&cpufreq_hw 0>; > @@ -273,6 +281,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_400>; > operating-points-v2 = <&cpu4_opp_table>; > + capacity-dmips-mhz = <1946>; Though I don't think it's technically required, in other systems (including the examples in the documentation) the biggest CPU gets 1024 "capacity-dmips-mhz" and the other ones are scaled to that. > + dynamic-power-coefficient = <520>; > interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, > <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; > qcom,freq-domain = <&cpufreq_hw 1>; > @@ -296,6 +306,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_500>; > operating-points-v2 = <&cpu4_opp_table>; > + capacity-dmips-mhz = <1946>; > + dynamic-power-coefficient = <520>; > interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, > <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; > qcom,freq-domain = <&cpufreq_hw 1>; > @@ -319,6 +331,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_600>; > operating-points-v2 = <&cpu4_opp_table>; > + capacity-dmips-mhz = <1946>; > + dynamic-power-coefficient = <520>; > interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, > <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; > qcom,freq-domain = <&cpufreq_hw 1>; > @@ -342,6 +356,8 @@ > &CLUSTER_SLEEP_0>; > next-level-cache = <&L2_700>; > operating-points-v2 = <&cpu7_opp_table>; > + capacity-dmips-mhz = <1985>; > + dynamic-power-coefficient = <552>; The fact that cpu7 has different values for capacity-dmips-mhz and dynamic-power-coefficient is surprising to me. I think what this means is that at the same MHz this core can process more instructions than the other big CPUs but that (at the same MHz) it burns more power doing so. Is that really true? I thought that this core was essentially the same as the other big cores but was simply anointed to be able to run a little faster. -Doug
Hi, On Sat, Nov 4, 2023 at 4:52 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > > > On 11/3/23 11:54, Ankit Sharma wrote: > > The "capacity-dmips-mhz" and "dynamic-power-coefficient" are > > used to build Energy Model which in turn is used by EAS to take > > placement decisions. So add it to SC7280 soc. > > > > Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com> > > ---Hi, thanks for this patch > > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > > I performed a quick grep in arch/arm64/boot/dts/qcom and noticed > that at least one of these values is missing for: > > rg -l --files-without-match dynamic-power-coeff $(rg cpu@ -l) | sort > ipq5018.dtsi (homogeneous cluster) > ipq5332.dtsi (homogeneous cluster) > ipq6018.dtsi (homogeneous cluster) > ipq8074.dtsi (homogeneous cluster) > ipq9574.dtsi (homogeneous cluster) > msm8916.dtsi (homogeneous cluster) > msm8939.dtsi > msm8953.dtsi > msm8976.dtsi > msm8994.dtsi > msm8996.dtsi > msm8998.dtsi > qcs404.dtsi (homogeneous cluster) > qdu1000.dtsi (homogeneous cluster) > sa8775p.dtsi > sc7280.dtsi > sc8180x.dtsi > sc8280xp.dtsi > sdm630.dtsi > sm4450.dtsi > sm6125.dtsi > sm6375.dtsi > sm8350.dtsi > sm8450.dtsi > > rg -l --files-without-match capacity-dmips $(rg cpu@ -l) | sort > ipq5018.dtsi (homogeneous cluster) > ipq5332.dtsi (homogeneous cluster) > ipq6018.dtsi (homogeneous cluster) > ipq8074.dtsi (homogeneous cluster) > ipq9574.dtsi (homogeneous cluster) > msm8916.dtsi (homogeneous cluster) > msm8939.dtsi > msm8994.dtsi > qcs404.dtsi (homogeneous cluster) > qdu1000.dtsi (homogeneous cluster) > sa8775p.dtsi > sc7280.dtsi > sm4450.dtsi > sm6375.dtsi > sm8350.dtsi > sm8450.dtsi > > Where platforms with a single, homogeneous cluster likely don't > benefit from EAS.. > > Is there any chance you could dig up the correct values, for at least > some of these platforms? Or would you know whom to ask? > > FWIW the one we're missing the most is sc8280xp.. FWIW, I wrote up a longwinded commit message when I added these values for sc7180. See commit 82ea7d411d43 ("arm64: dts: qcom: sc7180: Base dynamic CPU power coefficients in reality"). The short of it is that if you have hardware and a basic "smart battery" to measure power consumption it's pretty easy for anyone to add some reasonable numbers. -Doug
On 11/6/23 17:56, Doug Anderson wrote: > Hi, > > On Sat, Nov 4, 2023 at 4:52 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: >> >> >> >> On 11/3/23 11:54, Ankit Sharma wrote: >>> The "capacity-dmips-mhz" and "dynamic-power-coefficient" are >>> used to build Energy Model which in turn is used by EAS to take >>> placement decisions. So add it to SC7280 soc. >>> >>> Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com> >>> ---Hi, thanks for this patch >> >> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> >> >> I performed a quick grep in arch/arm64/boot/dts/qcom and noticed >> that at least one of these values is missing for: >> >> rg -l --files-without-match dynamic-power-coeff $(rg cpu@ -l) | sort >> ipq5018.dtsi (homogeneous cluster) >> ipq5332.dtsi (homogeneous cluster) >> ipq6018.dtsi (homogeneous cluster) >> ipq8074.dtsi (homogeneous cluster) >> ipq9574.dtsi (homogeneous cluster) >> msm8916.dtsi (homogeneous cluster) >> msm8939.dtsi >> msm8953.dtsi >> msm8976.dtsi >> msm8994.dtsi >> msm8996.dtsi >> msm8998.dtsi >> qcs404.dtsi (homogeneous cluster) >> qdu1000.dtsi (homogeneous cluster) >> sa8775p.dtsi >> sc7280.dtsi >> sc8180x.dtsi >> sc8280xp.dtsi >> sdm630.dtsi >> sm4450.dtsi >> sm6125.dtsi >> sm6375.dtsi >> sm8350.dtsi >> sm8450.dtsi >> >> rg -l --files-without-match capacity-dmips $(rg cpu@ -l) | sort >> ipq5018.dtsi (homogeneous cluster) >> ipq5332.dtsi (homogeneous cluster) >> ipq6018.dtsi (homogeneous cluster) >> ipq8074.dtsi (homogeneous cluster) >> ipq9574.dtsi (homogeneous cluster) >> msm8916.dtsi (homogeneous cluster) >> msm8939.dtsi >> msm8994.dtsi >> qcs404.dtsi (homogeneous cluster) >> qdu1000.dtsi (homogeneous cluster) >> sa8775p.dtsi >> sc7280.dtsi >> sm4450.dtsi >> sm6375.dtsi >> sm8350.dtsi >> sm8450.dtsi >> >> Where platforms with a single, homogeneous cluster likely don't >> benefit from EAS.. >> >> Is there any chance you could dig up the correct values, for at least >> some of these platforms? Or would you know whom to ask? >> >> FWIW the one we're missing the most is sc8280xp.. > > FWIW, I wrote up a longwinded commit message when I added these values > for sc7180. See commit 82ea7d411d43 ("arm64: dts: qcom: sc7180: Base > dynamic CPU power coefficients in reality"). > > The short of it is that if you have hardware and a basic "smart > battery" to measure power consumption it's pretty easy for anyone to > add some reasonable numbers. That's a big ask, especially with stupid laptop battmgr firmware that only refreshes data every 5 to 25 seconds :) Qcom probably has some reasonable numbers somewhere, given they are likely to test their SoCs' characteristics before taping them out en masse :P Konrad
Hi, On Mon, Nov 6, 2023 at 1:52 PM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > > > On 11/6/23 17:56, Doug Anderson wrote: > > Hi, > > > > On Sat, Nov 4, 2023 at 4:52 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > >> > >> > >> > >> On 11/3/23 11:54, Ankit Sharma wrote: > >>> The "capacity-dmips-mhz" and "dynamic-power-coefficient" are > >>> used to build Energy Model which in turn is used by EAS to take > >>> placement decisions. So add it to SC7280 soc. > >>> > >>> Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com> > >>> ---Hi, thanks for this patch > >> > >> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > >> > >> I performed a quick grep in arch/arm64/boot/dts/qcom and noticed > >> that at least one of these values is missing for: > >> > >> rg -l --files-without-match dynamic-power-coeff $(rg cpu@ -l) | sort > >> ipq5018.dtsi (homogeneous cluster) > >> ipq5332.dtsi (homogeneous cluster) > >> ipq6018.dtsi (homogeneous cluster) > >> ipq8074.dtsi (homogeneous cluster) > >> ipq9574.dtsi (homogeneous cluster) > >> msm8916.dtsi (homogeneous cluster) > >> msm8939.dtsi > >> msm8953.dtsi > >> msm8976.dtsi > >> msm8994.dtsi > >> msm8996.dtsi > >> msm8998.dtsi > >> qcs404.dtsi (homogeneous cluster) > >> qdu1000.dtsi (homogeneous cluster) > >> sa8775p.dtsi > >> sc7280.dtsi > >> sc8180x.dtsi > >> sc8280xp.dtsi > >> sdm630.dtsi > >> sm4450.dtsi > >> sm6125.dtsi > >> sm6375.dtsi > >> sm8350.dtsi > >> sm8450.dtsi > >> > >> rg -l --files-without-match capacity-dmips $(rg cpu@ -l) | sort > >> ipq5018.dtsi (homogeneous cluster) > >> ipq5332.dtsi (homogeneous cluster) > >> ipq6018.dtsi (homogeneous cluster) > >> ipq8074.dtsi (homogeneous cluster) > >> ipq9574.dtsi (homogeneous cluster) > >> msm8916.dtsi (homogeneous cluster) > >> msm8939.dtsi > >> msm8994.dtsi > >> qcs404.dtsi (homogeneous cluster) > >> qdu1000.dtsi (homogeneous cluster) > >> sa8775p.dtsi > >> sc7280.dtsi > >> sm4450.dtsi > >> sm6375.dtsi > >> sm8350.dtsi > >> sm8450.dtsi > >> > >> Where platforms with a single, homogeneous cluster likely don't > >> benefit from EAS.. > >> > >> Is there any chance you could dig up the correct values, for at least > >> some of these platforms? Or would you know whom to ask? > >> > >> FWIW the one we're missing the most is sc8280xp.. > > > > FWIW, I wrote up a longwinded commit message when I added these values > > for sc7180. See commit 82ea7d411d43 ("arm64: dts: qcom: sc7180: Base > > dynamic CPU power coefficients in reality"). > > > > The short of it is that if you have hardware and a basic "smart > > battery" to measure power consumption it's pretty easy for anyone to > > add some reasonable numbers. > That's a big ask, especially with stupid laptop battmgr firmware that > only refreshes data every 5 to 25 seconds :) Meh, the script I wrote (which you can find by following the text of the commit message or just looking here [1] should handle that OK. While the script is ugly, I wrote it to handle pretty non-granular measurements. Right now it's set to test each frequency for 2 minutes (min_time_per_freq) but it wouldn't be hard to make that 10 minutes per frequency. [1] https://lore.kernel.org/all/CAD=FV=U1FP0e3_AVHpauUUZtD-5X3XCwh5aT9fH_8S_FFML2Uw@mail.gmail.com/ > Qcom probably has some reasonable numbers somewhere, given they are > likely to test their SoCs' characteristics before taping them out > en masse :P Sure, if Qualcomm can give numbers that'd be wonderful. In the past they haven't been willing to and I tried to convince them that was silly because anyone with access to the hardware could measure this themselves. If Qualcomm has become more reasonable about this then that makes me happy. -Doug
On Fri, 03 Nov 2023 16:24:40 +0530, Ankit Sharma wrote: > The "capacity-dmips-mhz" and "dynamic-power-coefficient" are > used to build Energy Model which in turn is used by EAS to take > placement decisions. So add it to SC7280 soc. > > Applied, thanks! [1/1] arm64: dts: qcom: sc7280: Add capacity and DPC properties commit: 942bf463dec369172af81ad660d81d11bda88e39 Best regards,
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 8601253aec70..b1890824188c 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -176,6 +176,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_0>; operating-points-v2 = <&cpu0_opp_table>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -204,6 +206,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_100>; operating-points-v2 = <&cpu0_opp_table>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -227,6 +231,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_200>; operating-points-v2 = <&cpu0_opp_table>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -250,6 +256,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_300>; operating-points-v2 = <&cpu0_opp_table>; + capacity-dmips-mhz = <1024>; + dynamic-power-coefficient = <100>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 0>; @@ -273,6 +281,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_400>; operating-points-v2 = <&cpu4_opp_table>; + capacity-dmips-mhz = <1946>; + dynamic-power-coefficient = <520>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 1>; @@ -296,6 +306,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_500>; operating-points-v2 = <&cpu4_opp_table>; + capacity-dmips-mhz = <1946>; + dynamic-power-coefficient = <520>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 1>; @@ -319,6 +331,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_600>; operating-points-v2 = <&cpu4_opp_table>; + capacity-dmips-mhz = <1946>; + dynamic-power-coefficient = <520>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 1>; @@ -342,6 +356,8 @@ &CLUSTER_SLEEP_0>; next-level-cache = <&L2_700>; operating-points-v2 = <&cpu7_opp_table>; + capacity-dmips-mhz = <1985>; + dynamic-power-coefficient = <552>; interconnects = <&gem_noc MASTER_APPSS_PROC 3 &mc_virt SLAVE_EBI1 3>, <&epss_l3 MASTER_EPSS_L3_APPS &epss_l3 SLAVE_EPSS_L3_SHARED>; qcom,freq-domain = <&cpufreq_hw 2>;
The "capacity-dmips-mhz" and "dynamic-power-coefficient" are used to build Energy Model which in turn is used by EAS to take placement decisions. So add it to SC7280 soc. Signed-off-by: Ankit Sharma <quic_anshar@quicinc.com> --- changes in v2: https://lore.kernel.org/all/20231103095358.29312-1-quic_anshar@quicinc.com/ - updated commit message and subject. arch/arm64/boot/dts/qcom/sc7280.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)