From patchwork Sat Mar 2 13:10:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 10836577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85001922 for ; Sat, 2 Mar 2019 13:11:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FCAE2AC07 for ; Sat, 2 Mar 2019 13:11:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 636A02AC11; Sat, 2 Mar 2019 13:11:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 156A32AC07 for ; Sat, 2 Mar 2019 13:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=M9XS31bJuuKRE9sUN23esjgLjIkf4PCKOB9akSFY8zA=; b=qTe/5hXh6JSepR jgniax3cE5wx8oXkbYD3VPTwGghbas7Td9LAndbxfTn8jsZs7/ChdM7Dn1Gmy/fJMlgvH1tdLDzQs kX5fsni4T/E0LOG5S37l7Y/HOF3icDPHLevFbFlly4yPoz2z94M603BxKBYdsBEAQxF32ywOWRqTe GZCaOWIdEkMkevEsIxltp04N0JgjlNEld19HIKI/V5LgfglfFU4l9kLIjllEd/UnSj1xzgLiI2LrR IjYpikM3N/AsAmO1bavU4+RpX2o2gIYXAbLS44MTxRCgPa5BaedJ70nJMGGDj9NG3rmCFf9dxibf8 ZdQq1wCT2ceNa3A1PjsA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h04Pn-0005F8-9Y; Sat, 02 Mar 2019 13:10:55 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h04Pe-00057C-Hq; Sat, 02 Mar 2019 13:10:47 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B8741A78; Sat, 2 Mar 2019 05:10:39 -0800 (PST) Received: from why.lan (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E288A3F703; Sat, 2 Mar 2019 05:10:37 -0800 (PST) From: Marc Zyngier To: Heiko Stuebner Subject: [PATCH v2] arm64: rk3399: Add capacity-dmips-mhz attributes Date: Sat, 2 Mar 2019 13:10:30 +0000 Message-Id: <20190302131030.2091-1-marc.zyngier@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190302_051046_597713_99063579 X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lin Huang , Jeffy Chen , Douglas Anderson , linux-rockchip@lists.infradead.org, Enric Balletbo i Serra , Robin Murphy , linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The RK3399 has the interesting property to be a so called "big-little" system, where not all the CPUs are equal (the A53s are much weaker than the A72s). So far, we're not telling the OS that there is such a difference in processing capacity, and Linux assumes that they are equal. Too bad. Let's tell the OS about this by using the capacity-dmips-mhz property. The values used here are those used on the Juno platform, which is quite similar. This leads to the scheduler knowing that it can pack more tasks on the A72s, and leads to a better interactive experience. Tested-by: Robin Murphy Signed-off-by: Marc Zyngier --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 6cc1c9fa4ea6..1e75d9050441 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -75,6 +75,7 @@ #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + capacity-dmips-mhz = <485>; }; cpu_l1: cpu@1 { @@ -86,6 +87,7 @@ #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + capacity-dmips-mhz = <485>; }; cpu_l2: cpu@2 { @@ -97,6 +99,7 @@ #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + capacity-dmips-mhz = <485>; }; cpu_l3: cpu@3 { @@ -108,6 +111,7 @@ #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <100>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + capacity-dmips-mhz = <485>; }; cpu_b0: cpu@100 { @@ -119,6 +123,7 @@ #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <436>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + capacity-dmips-mhz = <1024>; }; cpu_b1: cpu@101 { @@ -130,6 +135,7 @@ #cooling-cells = <2>; /* min followed by max */ dynamic-power-coefficient = <436>; cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; + capacity-dmips-mhz = <1024>; }; idle-states {