From patchwork Wed Jul 11 08:34:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 141689 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp14655ljj; Wed, 11 Jul 2018 01:34:56 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeclzRzC09wVmSUil8O+7M5oJ+rkvxcOkTkxVZ0ttkAlXt8po45mWN+1yS17ml34kxjWCfC X-Received: by 2002:a63:c312:: with SMTP id c18-v6mr19570936pgd.449.1531298095874; Wed, 11 Jul 2018 01:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531298095; cv=none; d=google.com; s=arc-20160816; b=bmCYTdthBMHa5fB+a9hiweEouGiapz35ayEoVSEUoRwoTL/7tQSx5MP9NgsksNUYMs o0qwil4T+Vms6tTi7/HVUDKGxQy53K0jgwTJuKmiGUnYdfAS/Os4TQ5RtrIQ1v3LLUin iN/bO1bMdMTTzD/BGrPmpdstco/AWxjuf8jS6BH1qOL0LPp6bIF1p0p7H8/MX3RSMu7O 2c9b5pd1rjhdIBOsGYJj98xG7ZPxavCIpfEpaqoAbUl3JWkMTnP4sWyw+rrg5xeHF8PY YEUmFx8BZsWqCRb+IdSA7Kc12R6/otvA9OgEOqWTec3d+6uicYg/ubnP3OEDU4VSX6il vrsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=DhF9X/zdFWdM+0QZ+jOdelyEXw9wm4yLlqzwif+RUN0=; b=OZ09aMyyzfRWnBXUk3R8Z3rJ6ZWALzJFqfzLKv+3ycrE/TimnJzP6AxTrM99OOdHxH HW1bwZQEXGA94EmZrKe882LZkP/P0TAEyPTNP7cK8dlZFdNBC7QPR1xBfCvnB9RsLMii OxikQsmA0zlqF5fT7ySXM4bLti5lLx/dQi0iDDsIwCpnPOVV6ZC/mb2Hm50WBftuMLVf A52EsvCyQ9NEyXH4NcumYbeiJYE//Z3uqgrUpD//eR+QeQ7xHKZwamwmsJGgN6HpEyP9 awWgdkoVkPQgw0/cNGgFEIa5YCh0xxikp/uFRTE7E6/PZI+IM14lX/vjm1YRiHrSu+jq inHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=iyhP1BzB; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si18507359plo.226.2018.07.11.01.34.55; Wed, 11 Jul 2018 01:34:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=iyhP1BzB; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732387AbeGKIiE (ORCPT + 5 others); Wed, 11 Jul 2018 04:38:04 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:52987 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732416AbeGKIiE (ORCPT ); Wed, 11 Jul 2018 04:38:04 -0400 Received: by mail-wm0-f68.google.com with SMTP id w16-v6so1558381wmc.2 for ; Wed, 11 Jul 2018 01:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+I6OIg36t95Th5iXvJlAY8Z+H6uQainG1Q9X4MDHbIg=; b=iyhP1BzBSI3Bi7ufQOk/K1lH9Q758088glOdukq1CNuEt8/BX2Lkzaog9l3TpykRL3 tUssC8sw2MDRO3dJZ+lQ2u4q1m6n3ESMAeLpkGARj7qgOJ1N2RD9CbNojz187VnmCKn0 Lxx6BYYAXlkEH9004bEoeovE4eOoDqI79AqPk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+I6OIg36t95Th5iXvJlAY8Z+H6uQainG1Q9X4MDHbIg=; b=sdZQJBn/4uiohOVaxJ7ckU9pex5fCeO/AZVf4gVOM/kod0fhSaG0TaGW4wR+xs3No4 tdYvvTdQb1nPdjy67rZ/G8kMLZXKah+JB4kLBq9RhEokelV0QV9bt/hKnrNwUkVcqQ3v JHPESOS9jx453A950wt6mgu1jXikcKqFxuS8W/kl6yhEMq8cJwvYti74slH1GPuzU6iR BcoSfo3HSSC0OMuDw05WuTiHT2RUFsRN7D+5848Esnwepj8xTK9gM42KhKkEFRIOCUGv oxUIiBEwSyba3nv4GHXtKI9P2GJhBb6OJChWIGgYqTumCrRPRmpQhjJKt4nqJdj1am7I fCYw== X-Gm-Message-State: APt69E34D1GjCzZdCh2udWYM+O4laL2+FsX44W+SX4+QUoKoVkRd9rHK JMbPy45EEB0gdq7FeO7usRyy39oBY7w= X-Received: by 2002:a1c:e304:: with SMTP id a4-v6mr16443858wmh.0.1531298092495; Wed, 11 Jul 2018 01:34:52 -0700 (PDT) Received: from vingu-laptop.home ([2a01:cb14:8227:ec00:b908:2715:da60:7493]) by smtp.gmail.com with ESMTPSA id y203-v6sm2234815wme.42.2018.07.11.01.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jul 2018 01:34:51 -0700 (PDT) From: Vincent Guittot To: xuwei5@hisilicon.com, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: leo.yan@linaro.org, daniel.lezcano@linaro.org, Vincent Guittot Subject: [PATCH v2] arm64: hikey960: update idle-states Date: Wed, 11 Jul 2018 10:34:46 +0200 Message-Id: <1531298086-8375-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Update entry/exit latency and residency time of hikey960 to use more realistic figures based on unitary tests done on the platform. The complete results (in us) : big cluster cluster CPU max entry latency 800 400 max exit latency 2900 550 residency 903Mhz 5000 1500 residency 2363Mhz 0 1500 little cluster cluster CPU max entry latency 500 400 max exit latency 1600 650 residency 533Mhz 8000 4500 residency 1844Mhz 0 1500 We can see that the residency time depends of the running OPP which is not handled for now. Then we also have to take into account the constraint of a residency time shorter than the tick to get full advantage of idle loop reordering(tick is stopped if idle duration is higher than tick period). Finally the selected residency value are : big cluster cluster CPU residency 3700 1500 little cluster cluster CPU residency 3500 1500 A simple test with a task waking up every 11.111ms shows improvement: - 5% a lowest OPP - 22% at highest OPP The period has been chosen: - to be shorter than old cluster residency time and longer than new residency time of cluster off C-state - to prevent any sync with tick (4ms) when running tests that can add some variances between tests Signed-off-by: Vincent Guittot --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 45 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index 421d454..890d23e 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi @@ -61,7 +61,7 @@ reg = <0x0 0x0>; enable-method = "psci"; next-level-cache = <&A53_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; operating-points-v2 = <&cluster0_opp>; @@ -75,7 +75,7 @@ reg = <0x0 0x1>; enable-method = "psci"; next-level-cache = <&A53_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; operating-points-v2 = <&cluster0_opp>; @@ -87,7 +87,7 @@ reg = <0x0 0x2>; enable-method = "psci"; next-level-cache = <&A53_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; operating-points-v2 = <&cluster0_opp>; @@ -99,7 +99,7 @@ reg = <0x0 0x3>; enable-method = "psci"; next-level-cache = <&A53_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_0>; + cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>; capacity-dmips-mhz = <592>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER0>; operating-points-v2 = <&cluster0_opp>; @@ -111,7 +111,7 @@ reg = <0x0 0x100>; enable-method = "psci"; next-level-cache = <&A73_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; + cpu-idle-states = <&CPU_SLEEP_1 &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; operating-points-v2 = <&cluster1_opp>; @@ -125,7 +125,7 @@ reg = <0x0 0x101>; enable-method = "psci"; next-level-cache = <&A73_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; + cpu-idle-states = <&CPU_SLEEP_1 &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; operating-points-v2 = <&cluster1_opp>; @@ -137,7 +137,7 @@ reg = <0x0 0x102>; enable-method = "psci"; next-level-cache = <&A73_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; + cpu-idle-states = <&CPU_SLEEP_1 &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; operating-points-v2 = <&cluster1_opp>; @@ -149,7 +149,7 @@ reg = <0x0 0x103>; enable-method = "psci"; next-level-cache = <&A73_L2>; - cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP_1>; + cpu-idle-states = <&CPU_SLEEP_1 &CLUSTER_SLEEP_1>; capacity-dmips-mhz = <1024>; clocks = <&stub_clock HI3660_CLK_STUB_CLUSTER1>; operating-points-v2 = <&cluster1_opp>; @@ -158,31 +158,40 @@ idle-states { entry-method = "psci"; - CPU_SLEEP: cpu-sleep { + CPU_SLEEP_0: cpu-sleep-0 { compatible = "arm,idle-state"; local-timer-stop; arm,psci-suspend-param = <0x0010000>; - entry-latency-us = <40>; - exit-latency-us = <70>; - min-residency-us = <3000>; + entry-latency-us = <400>; + exit-latency-us = <650>; + min-residency-us = <1500>; }; - CLUSTER_SLEEP_0: cluster-sleep-0 { compatible = "arm,idle-state"; local-timer-stop; arm,psci-suspend-param = <0x1010000>; entry-latency-us = <500>; - exit-latency-us = <5000>; - min-residency-us = <20000>; + exit-latency-us = <1600>; + min-residency-us = <3500>; + }; + + + CPU_SLEEP_1: cpu-sleep-1 { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x0010000>; + entry-latency-us = <400>; + exit-latency-us = <550>; + min-residency-us = <1500>; }; CLUSTER_SLEEP_1: cluster-sleep-1 { compatible = "arm,idle-state"; local-timer-stop; arm,psci-suspend-param = <0x1010000>; - entry-latency-us = <1000>; - exit-latency-us = <5000>; - min-residency-us = <20000>; + entry-latency-us = <800>; + exit-latency-us = <2900>; + min-residency-us = <3500>; }; };