From patchwork Fri Jan 6 16:46:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 640450 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35607C5479D for ; Fri, 6 Jan 2023 16:49:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231458AbjAFQtJ (ORCPT ); Fri, 6 Jan 2023 11:49:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236438AbjAFQso (ORCPT ); Fri, 6 Jan 2023 11:48:44 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DE4D7CDE5 for ; Fri, 6 Jan 2023 08:46:39 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id m7so1777017wrn.10 for ; Fri, 06 Jan 2023 08:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=D3oJpCSGnnDJtoKqiOy/io+oXZbWMd8CgdZY3qs2G2Q=; b=qpMR9X5BgMZLO6LuXpbgh+LKWdi9seLm9UpJqzwZeSc7hagiD2LM4sAjrOeLX4Gzii yPuO4bFe/zKGO7VA0NZcGEttyiiTk0p+svKkmywDvXbfxCqxfRxBL7t5mfGI36+2UPec EVZzLQ2KGgEW8GcUNwj4BUVm70dFiyApVGDxtu4QgmMl/yO9uGbRP70fgEFnKBboNjp+ IYRfjvQ/NcSHQzF6mn3+vA8tgN2EqZgb53XfUnSkLYQ8SWGhdRAZ58eGLdTBfvx9mjbb BDVnR6Y7FjpsD1TJBlDPE2c6gtgdH9yWpaBMAkCwdEwev/vqrlaY6IiBqr1pIckHSRvK iXqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=D3oJpCSGnnDJtoKqiOy/io+oXZbWMd8CgdZY3qs2G2Q=; b=gloU96Zx3yxKJSNwsmVuC2oHRhSBlLdIWhXY2ZL8eI/91Km9Mci9Zg61Q8DaQER9PI C0nHJvQvQUP6m8VNqVbZ5cu9DfrhaOT9jpmakrkgX6GFeg0QklCJQNLSUJFvCOn+/pxr z8O55tDhP++nO3PCtMlmfYSTUFOIfNpsFJzvntEXkxKHY8B0LYhqYEPE8K2A2Griiwpj pFcUqIGcg6lhO4tF2ZclMhnFeQXEQl3OJZ0QJSOmEX21dh1/OiwWp5IQJxnWJN/xwTY1 udOK//e0oZSIeaivqmoKXi6D25KMKfScHVRO7UM7rN/47VqBZVq6jo5m7Zh9Al1SXSGM aAZA== X-Gm-Message-State: AFqh2kp1/t1O2EEP4UCuXX8zIyPB8YbmJQRVMKSkCzCFCo4Oibvn0h6p PDRO4u0A5xgiGthX6LsTr9QZtg== X-Google-Smtp-Source: AMrXdXsPpwdAEKZ/QTxH1EEGLQ3xybMXm99F+tFdxmq0b/1bdwFk1HQR5MWl5UrczpOvIrg1MmqVuQ== X-Received: by 2002:a5d:4884:0:b0:242:3812:f948 with SMTP id g4-20020a5d4884000000b002423812f948mr35405492wrq.24.1673023581350; Fri, 06 Jan 2023 08:46:21 -0800 (PST) Received: from vingu-book.. ([2a01:e0a:f:6020:98f9:4145:643f:e1da]) by smtp.gmail.com with ESMTPSA id z18-20020a5d44d2000000b002368f6b56desm1916999wrr.18.2023.01.06.08.46.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 08:46:20 -0800 (PST) From: Vincent Guittot To: dmitry.baryshkov@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: danny@kdrag0n.dev, Vincent Guittot Subject: [PATCH] arm64: dts: qcom: sdm845: correct dynamic power coefficients Date: Fri, 6 Jan 2023 17:46:18 +0100 Message-Id: <20230106164618.1845281-1-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org While stressing EAS on my dragonboard RB3, I have noticed that LITTLE cores where never selected as the most energy efficient CPU whatever the utilization level of waking task. energy model framework uses its cost field to estimate the energy with the formula: nrg = cost of the selected OPP * utilization / CPU's max capacity which ends up selecting the CPU with lowest cost / max capacity ration as long as the utilization fits in the OPP's capacity. If we compare the cost of a little OPP with similar capacity of a big OPP like : OPP(kHz) OPP capacity cost max capacity cost/max capacity LITTLE 1766400 407 351114 407 863 big 1056000 408 520267 1024 508 This can be interpreted as the LITTLE core consumes 70% more than big core for the same compute capacity. According to [1], LITTLE consumes 10% less than big core for Coremark benchmark at those OPPs. If we consider that everything else stays unchanged, the dynamic-power-coefficient of LITTLE core should be only 53% of the current value: 290 * 53% = 154 Set the dynamic-power-coefficient of CPU0-3 to 154 to fix the energy model. [1] https://github.com/kdrag0n/freqbench/tree/master/results/sdm845/main Fixes: 0e0a8e35d725 ("arm64: dts: qcom: sdm845: correct dynamic power coefficients") Signed-off-by: Vincent Guittot --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 65032b94b46d..869bdb9bce6e 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -198,7 +198,7 @@ CPU0: cpu@0 { reg = <0x0 0x0>; enable-method = "psci"; capacity-dmips-mhz = <611>; - dynamic-power-coefficient = <290>; + dynamic-power-coefficient = <154>; qcom,freq-domain = <&cpufreq_hw 0>; operating-points-v2 = <&cpu0_opp_table>; interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>, @@ -222,7 +222,7 @@ CPU1: cpu@100 { reg = <0x0 0x100>; enable-method = "psci"; capacity-dmips-mhz = <611>; - dynamic-power-coefficient = <290>; + dynamic-power-coefficient = <154>; qcom,freq-domain = <&cpufreq_hw 0>; operating-points-v2 = <&cpu0_opp_table>; interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>, @@ -243,7 +243,7 @@ CPU2: cpu@200 { reg = <0x0 0x200>; enable-method = "psci"; capacity-dmips-mhz = <611>; - dynamic-power-coefficient = <290>; + dynamic-power-coefficient = <154>; qcom,freq-domain = <&cpufreq_hw 0>; operating-points-v2 = <&cpu0_opp_table>; interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>, @@ -264,7 +264,7 @@ CPU3: cpu@300 { reg = <0x0 0x300>; enable-method = "psci"; capacity-dmips-mhz = <611>; - dynamic-power-coefficient = <290>; + dynamic-power-coefficient = <154>; qcom,freq-domain = <&cpufreq_hw 0>; operating-points-v2 = <&cpu0_opp_table>; interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_EBI1 3>,