From patchwork Sun Feb 24 14:35:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 10828003 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 EA5A91575 for ; Sun, 24 Feb 2019 14:38:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9B3227FA9 for ; Sun, 24 Feb 2019 14:38:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6AB62B431; Sun, 24 Feb 2019 14:38:20 +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 66D1427FA9 for ; Sun, 24 Feb 2019 14:38:20 +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=RFOBYGPw5NW3gz+YYj9mIvGTZmQyIQLtDdw+famSVos=; b=fgp/B9OyaDv57m fpfDLIWSaocNjj/m418XvNvgDO1w7EDy16YGnEM0BFgTWqEcVcUh2EYLWJxLNuz3ErywOA1qGuPqT ua7kyUn1jbEdq/ZgFGmTv7sNxlA00wh6V1ShkR1WhNKG01NebDAOtM999jjFDMRxkhv2vkXb+fqx0 R34qX6DZeqnhOabn+CvJbpXlRtc/nF+7gSDbgHfEnPy7Wkt+kCsXQBAldZUwO2kJekN0cdK3REoSK JjmZwwS3WAPQdr4OdNdso7S+wNwjFl1HSqhIazcioxiJK9Ig4lGFpjMHM8kJL61sBEIuMNtBeRaZ3 q1aufe2GhUqO0UUitq6Q==; 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 1gxust-0000zu-Rz; Sun, 24 Feb 2019 14:36:03 +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 1gxush-0000wZ-7Q; Sun, 24 Feb 2019 14:35:53 +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 EA3ADA78; Sun, 24 Feb 2019 06:35:48 -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 45D2A3F690; Sun, 24 Feb 2019 06:35:47 -0800 (PST) From: Marc Zyngier To: Heiko Stuebner Subject: [PATCH] arm64: rk3399: Add capacity-dmips-mhz attributes Date: Sun, 24 Feb 2019 14:35:25 +0000 Message-Id: <20190224143525.15539-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-20190224_063551_272394_20B6DECF X-CRM114-Status: GOOD ( 12.21 ) 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 , 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. Signed-off-by: Marc Zyngier Tested-by: Robin Murphy --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 6cc1c9fa4ea6..7eab31184aee 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 = <578>; }; 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 = <578>; }; 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 = <578>; }; 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 = <578>; }; cpu_b0: cpu@100 { @@ -118,7 +122,7 @@ clocks = <&cru ARMCLKB>; #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 +134,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 {