Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp245651imm; Wed, 11 Jul 2018 01:29:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeUtrV/pCnv9vqjK9+lF83boFUMyN3SW9JXK0jxsKRdCQ8vwbl88D2Wc7LJlFHiYRj4TEKz X-Received: by 2002:a63:2106:: with SMTP id h6-v6mr24327874pgh.161.1531297748757; Wed, 11 Jul 2018 01:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531297748; cv=none; d=google.com; s=arc-20160816; b=0DLY5fwrcW/OLTtGcRw/YlJpQeyi6MFFwDlkujIeJQizElpFr290tMVOC0slM685cs BzS2AmnPa+oJ0QyaBrormsBXJf1NMCLVrD+6guWM3zd7bnIjzabUyKkH1IyZwF+RX0nP g/iVAzoxeMb9ck05LLfo4y9AuL+LjKM3LYD4rGFPLdbj1IL1eZLqopx0vym5jN5AKk+Q krgV4Yp/Rjcvn6qYKlGcFDDlgeKCcquG9iqhxRsoDz0bQLP56N5Dmijo27cHLJUAQRhw G9zyGs9/+mcIXK1xgQOEKtbB7BoY7sDLaToZAPm/AKIv0MLz7Is3qmbKr7FxroWznG1m i9JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=ik17im91F5KmQ9BwhQwAFv8p9cnR5TafQO88otY/fJ0=; b=gc3jnlz59igsbZ/zqX8YE/eOKQs/ummVMHHIjUFig7hZbARxWdG6jKkhaIMXaMtqmU wU+90xbH2OjXy4lEyT+eOWptC+UEl0xOrxWzLyIfYo5jse+gU2DqDUvi7xfDjTpqFVLt pMrKSqEhLVVIMvlIonJ67X6qFXryTrwwx+jZjJu53mngsWPoRj9l6DFIigO9leFP2AlC pjQi4+mj5ga9lJxqHMFcsM6a3P6Xpx1UFvsABf99hXvbSfmHzEDjjar1xAUAhldY+3fn XQqmvDEaO0lXvGbJ4iWzmZXhXapFZ/j3rWEta0gbyXuySrERdKCbq+1/hy6jynaCU85c vBHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Y3YWy/kV"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 67-v6si17817434pgi.456.2018.07.11.01.28.52; Wed, 11 Jul 2018 01:29:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Y3YWy/kV"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732394AbeGKIa2 (ORCPT + 99 others); Wed, 11 Jul 2018 04:30:28 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:33185 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726438AbeGKIa2 (ORCPT ); Wed, 11 Jul 2018 04:30:28 -0400 Received: by mail-it0-f68.google.com with SMTP id y124-v6so17149630itc.0 for ; Wed, 11 Jul 2018 01:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ik17im91F5KmQ9BwhQwAFv8p9cnR5TafQO88otY/fJ0=; b=Y3YWy/kVgWNLBRMtigMcnp7oqncmJduHyhkfxk8Wn8aSoNwsBJY1d1h4CfaLZRAb19 08uY6G5dKsVFUXRHzaIYX2bhJV1AaXf8xBY4xk08PKkCyhWGT+LzU6ubjwjuXnZa7V9q J9jTtYw2M9wsZ88UetObjRrrxkTooKgT+qVpk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ik17im91F5KmQ9BwhQwAFv8p9cnR5TafQO88otY/fJ0=; b=r2gKIS3mrCVx/O2suehlo8IsWzCUiEFffa0hD8zjRNIgCjMcMI9HQZMei/TsBR4gYW yViPgvRFopTB4YDZmti14Lavi6b7d2UBIkC281yCa8xChcXgoWzV1K4YdZ/1KdPNGXHH h9uvP1dwd4S8DAh2l1pMP35kCkXKwlGYlprMD1b9JgufTT7+uZSKpQ15mwScOOp9wQga fl5r6Y0nLCgaf2FV7+QWLErRqPNLUixIv9gwFzzBIB/UsV8qfQu6FiUqy2AHiAdP4mY+ rl6Ow14T3VPOkh+4cEmQA7ZrmkZHWK1Gcl30lkzbg95ZFwBdARRDrCuk01GcemCJ4FXz R+1w== X-Gm-Message-State: APt69E313jmR0aCy1ztvwRqVF83tsM0hNAo56c9TPNv5EGESwKsjEMXM bJ84Zi2JJvxXWjHmk+JJEuI1OVoJFoQqQAg1znya6A== X-Received: by 2002:a24:d909:: with SMTP id p9-v6mr20978764itg.89.1531297640140; Wed, 11 Jul 2018 01:27:20 -0700 (PDT) MIME-Version: 1.0 References: <1530860246-29072-1-git-send-email-vincent.guittot@linaro.org> <20180708140157.GA28878@leoy-ThinkPad-X240s> In-Reply-To: <20180708140157.GA28878@leoy-ThinkPad-X240s> From: Vincent Guittot Date: Wed, 11 Jul 2018 10:27:09 +0200 Message-ID: Subject: Re: [PATCH] arm64: hikey960: update idle-states To: Leo Yan Cc: Wei Xu , Rob Herring , LAK , devicetree@vger.kernel.org, linux-kernel , Daniel Lezcano Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leo, On Sun, 8 Jul 2018 at 16:02, wrote: > > Hi Vincent, > > On Fri, Jul 06, 2018 at 08:57:26AM +0200, Vincent Guittot wrote: > > 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: > > Should s/11,111ms/11.111ms ? As Daniel explained, I have used the french notation. Will use the other one in the next version > > > - 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 od cluster off C-state > > Should s/od/of/ ? Yes > > Except these two minor typos, the patch is very good improvement. > > Reviewed-by: Leo Yan I'm going to send a new version with fix in the commit Thanks > > > - 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(-) > > > > 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>; > > }; > > }; > > > > -- > > 2.7.4 > >