From patchwork Fri Dec 18 02:42:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "fan.chen" X-Patchwork-Id: 7879361 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6EE0F9F349 for ; Fri, 18 Dec 2015 02:52:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C49820445 for ; Fri, 18 Dec 2015 02:52:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5F11201ED for ; Fri, 18 Dec 2015 02:52:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9l9Y-0003eO-0G; Fri, 18 Dec 2015 02:52:20 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9l2f-0003E3-B2; Fri, 18 Dec 2015 02:45:33 +0000 X-Listener-Flag: 11101 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 832870120; Fri, 18 Dec 2015 10:44:54 +0800 Received: from mtkslt301.mediatek.inc (10.21.14.114) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Fri, 18 Dec 2015 10:44:53 +0800 From: Fan Chen To: Sascha Hauer , Matthias Brugger , Lorenzo Pieralisi , Mark Rutland Subject: [PATCH 4/4] arm64: dts: mediatek: Improve cpuidle latency on MT8173 Date: Fri, 18 Dec 2015 10:42:31 +0800 Message-ID: <1450406551-1741-5-git-send-email-fan.chen@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1450406551-1741-1-git-send-email-fan.chen@mediatek.com> References: <1450406551-1741-1-git-send-email-fan.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151217_184514_108544_76D46CF3 X-CRM114-Status: GOOD ( 11.53 ) X-Spam-Score: -1.1 (-) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Liao , Koro Chen , linux-kernel@vger.kernel.org, Weiyi Lu , Pawel Moll , Ian Campbell , Catalin Marinas , Will Deacon , Flora Fu , "yt.lee" , Fan Chen , devicetree@vger.kernel.org, Rob Herring , linux-mediatek@lists.infradead.org, Kumar Gala , Yingjoe Chen , Eddie Huang , jens.wiklander@linaro.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Weiyi Lu All according to the exact profiling result: First, each CPU cluster needs its own nodes due to the latency gap between each other. Second, tune the parameters to enter the lowest idle state as much time as possible without disturbing the system performance for power-saving demand. Signed-off-by: Weiyi Lu --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 34 +++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index 77c1f84..0ae3983 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi @@ -69,7 +69,7 @@ compatible = "arm,cortex-a57"; reg = <0x100>; enable-method = "psci"; - cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + cpu-idle-states = <&CPU_SLEEP_1 &CLUSTER_SLEEP_1>; }; cpu3: cpu@101 { @@ -77,7 +77,7 @@ compatible = "arm,cortex-a57"; reg = <0x101>; enable-method = "psci"; - cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; + cpu-idle-states = <&CPU_SLEEP_1 &CLUSTER_SLEEP_1>; }; idle-states { @@ -86,18 +86,36 @@ CPU_SLEEP_0: cpu-sleep-0 { compatible = "arm,idle-state"; local-timer-stop; - entry-latency-us = <639>; - exit-latency-us = <680>; - min-residency-us = <1088>; + entry-latency-us = <72>; + exit-latency-us = <66>; + min-residency-us = <458>; arm,psci-suspend-param = <0x0010000>; }; CLUSTER_SLEEP_0: cluster-sleep-0 { compatible = "arm,idle-state"; local-timer-stop; - entry-latency-us = <800>; - exit-latency-us = <1000>; - min-residency-us = <2000>; + entry-latency-us = <145>; + exit-latency-us = <60>; + min-residency-us = <331>; + arm,psci-suspend-param = <0x1010000>; + }; + + CPU_SLEEP_1: cpu-sleep-1 { + compatible = "arm,idle-state"; + local-timer-stop; + entry-latency-us = <72>; + exit-latency-us = <66>; + min-residency-us = <516>; + arm,psci-suspend-param = <0x0010000>; + }; + + CLUSTER_SLEEP_1: cluster-sleep-1 { + compatible = "arm,idle-state"; + local-timer-stop; + entry-latency-us = <287>; + exit-latency-us = <62>; + min-residency-us = <1423>; arm,psci-suspend-param = <0x1010000>; }; };