{"id":807663,"url":"http://patchwork.ozlabs.org/api/1.0/patches/807663/?format=json","project":{"id":19,"url":"http://patchwork.ozlabs.org/api/1.0/projects/19/?format=json","name":"Linux IMX development","link_name":"linux-imx","list_id":"linux-imx-kernel.lists.patchwork.ozlabs.org","list_email":"linux-imx-kernel@lists.patchwork.ozlabs.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20170830144120.9312-3-dietmar.eggemann@arm.com>","date":"2017-08-30T14:41:18","name":"[2/4] arm: dts: exynos: add exynos5420 cpu capacity-dmips-mhz information","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"d28e0e240112a39407200359f025019a71cb0d30","submitter":{"id":64545,"url":"http://patchwork.ozlabs.org/api/1.0/people/64545/?format=json","name":"Dietmar Eggemann","email":"dietmar.eggemann@arm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-imx/patch/20170830144120.9312-3-dietmar.eggemann@arm.com/mbox/","series":[{"id":629,"url":"http://patchwork.ozlabs.org/api/1.0/series/629/?format=json","date":"2017-08-30T14:41:18","name":"arm: remove cpu_efficiency","version":1,"mbox":"http://patchwork.ozlabs.org/series/629/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807663/checks/","tags":{},"headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"GsrkFjoX\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xj7WZ6fRBz9s9Y\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 00:42:18 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dn4C7-0007vc-5H; Wed, 30 Aug 2017 14:42:15 +0000","from foss.arm.com ([217.140.101.70])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dn4Bv-0007mL-Sa for linux-arm-kernel@lists.infradead.org;\n\tWed, 30 Aug 2017 14:42:11 +0000","from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4116215BE;\n\tWed, 30 Aug 2017 07:41:48 -0700 (PDT)","from e107985-lin.cambridge.arm.com (e107985-lin.cambridge.arm.com\n\t[10.1.210.41])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\t2A9B73F483; Wed, 30 Aug 2017 07:41:46 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=zhsLhfcz5LRnUwhN1v3PjrtJTfCAhp3iMnDdCPxbZoA=;\n\tb=GsrkFjoXbzlgOC\n\tzKvFZ3jk0TRcXKFWYfKWMHRtUSxKknOfj9yFJ1jcK2NiXVlze9F/Ao/UGUKEmVGOBW99hvaHf4cu+\n\t57O/DHotbbH7HKs8woMZy2x5rzUBx82mKjeapqsMyUEIWR0uyO+5MAIcxrCEGRmNno92MB/o2dFp5\n\tDebUKwuPU8/mpPFHJ8X/NZDEDapreuTP3hMRPH2yWCB1iMYQd/5HUbFJOXGY1U/1yDWvNVOMxT3Ug\n\tnh2gMkzRGgz8ayjM+xE4rJhTkqhgEokz9YCW2LbxBosdGHHh6J5fjdnErnQWaIxppgiR8qWQkc6B3\n\tbB0mZmgccG9YUA4wd76w==;","From":"Dietmar Eggemann <dietmar.eggemann@arm.com>","To":"linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tdevicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org,\n\tlinux-renesas-soc@vger.kernel.org","Subject":"[PATCH 2/4] arm: dts: exynos: add exynos5420 cpu capacity-dmips-mhz\n\tinformation","Date":"Wed, 30 Aug 2017 15:41:18 +0100","Message-Id":"<20170830144120.9312-3-dietmar.eggemann@arm.com>","X-Mailer":"git-send-email 2.11.0","In-Reply-To":"<20170830144120.9312-1-dietmar.eggemann@arm.com>","References":"<20170830144120.9312-1-dietmar.eggemann@arm.com>","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170830_074204_040497_18203283 ","X-CRM114-Status":"GOOD (  10.32  )","X-Spam-Score":"-6.9 (------)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [217.140.101.70 listed in list.dnswl.org]\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"Mark Rutland <mark.rutland@arm.com>,\n\tVincent Guittot <vincent.guittot@linaro.org>,\n\tJuri Lelli <juri.lelli@arm.com>, \n\tRussell King <linux@armlinux.org.uk>, Rob Herring <robh+dt@kernel.org>,\n\tKukjin Kim <kgene@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"},"content":"The following 'capacity-dmips-mhz' dt property values are used:\n\nCortex-A15: 1024, Cortex-A7: 539\n\nThey have been derived from the cpu_efficiency values:\n\nCortex-A15: 3891, Cortex-A7: 2048\n\nby scaling them so that the Cortex-A15s (big cores) use 1024.\n\nThe cpu_efficiency values were originally derived from the \"Big.LITTLE\nProcessing with ARM Cortex™-A15 & Cortex-A7\" white paper\n(http://www.cl.cam.ac.uk/~rdm34/big.LITTLE.pdf). Table 1 lists 1.9x\n(3891/2048) as the Cortex-A15 vs Cortex-A7 performance ratio for the\nDhrystone benchmark.\n\nThe following platforms are affected once cpu-invariant accounting\nsupport is re-connected to the task scheduler:\n\narndale-octa, peach-pi, peach-pit, smdk5420\n\nThe patch has been tested on Samsung Chromebook 2 13\" (peach-pi, Exynos\n5800).\n\n$ cat /sys/devices/system/cpu/cpu*/cpu_capacity\n1024\n1024\n1024\n1024\n389\n389\n389\n389\n\nThe Cortex-A15 vs Cortex-A7 performance ratio is 1024/389 = 2.63.\n\nThe values derived with the 'cpu_efficiency/clock-frequency dt property'\nsolution are:\n\n$ cat /sys/devices/system/cpu/cpu*/cpu_capacity\n1535\n1535\n1535\n1535\n448\n448\n448\n448\n\nThe Cortex-A15 vs Cortex-A7 performance ratio is 1535/448 = 3.43.\n\nThe discrepancy between 2.63 and 3.43 is due to the false assumption\nwhen using the 'cpu_efficiency/clock-frequency dt property' solution\nthat the max cpu frequency of the little cpus is 1 GHZ and not 1.3 GHz.\nThe Cortex-A7 cluster runs with a max cpu frequency of 1.3 GHZ whereas\nthe 'clock-frequency' property value is set to 1 GHz.\n\n3.43/1.3 = 2.64\n\n$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq\n1800000\n1800000\n1800000\n1800000\n1300000 <-- max cpu frequency of the Cortex-A7s (little cores)\n1300000\n1300000\n1300000\n\nRunning another benchmark (single-threaded sysbench affine to the\nindividual cpus) with performance cpufreq governor on the Samsung\nChromebook 2 13\" showed the following numbers:\n\n$ for i in `seq 0 7`; do taskset -c $i sysbench --test=cpu\n  --num-threads=1 --max-time=10 run | grep \"total number of events:\";\n  done\n\ntotal number of events: 1083\ntotal number of events: 1085\ntotal number of events: 1085\ntotal number of events: 1085\ntotal number of events: 454\ntotal number of events: 454\ntotal number of events: 454\ntotal number of events: 454\n\nThe Cortex-A15 vs Cortex-A7 performance ratio is 2.39, i.e. very close\nto the one derived from the Dhrystone based one of the \"Big.LITTLE\nProcessing with ARM Cortex™-A15 & Cortex-A7\" white paper (2.63).\n\nWe don't aim for exact values for the cpu capacity values. Besides the\nCPI (Cycles Per Instruction), the instruction mix and whether the system\nruns cpu-bound or memory-bound has an impact on the cpu capacity values\nderived from these benchmark results.\n\nCc: Rob Herring <robh+dt@kernel.org>\nCc: Mark Rutland <mark.rutland@arm.com>\nCc: Russell King <linux@armlinux.org.uk>\nCc: Kukjin Kim <kgene@kernel.org>\nCc: Krzysztof Kozlowski <krzk@kernel.org>\nSigned-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>\n---\n arch/arm/boot/dts/exynos5420-cpus.dtsi | 8 ++++++++\n 1 file changed, 8 insertions(+)","diff":"diff --git a/arch/arm/boot/dts/exynos5420-cpus.dtsi b/arch/arm/boot/dts/exynos5420-cpus.dtsi\nindex 5c052d7ff554..d7d703aa1699 100644\n--- a/arch/arm/boot/dts/exynos5420-cpus.dtsi\n+++ b/arch/arm/boot/dts/exynos5420-cpus.dtsi\n@@ -36,6 +36,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <11>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <1024>;\n \t\t};\n \n \t\tcpu1: cpu@1 {\n@@ -48,6 +49,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <11>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <1024>;\n \t\t};\n \n \t\tcpu2: cpu@2 {\n@@ -60,6 +62,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <11>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <1024>;\n \t\t};\n \n \t\tcpu3: cpu@3 {\n@@ -72,6 +75,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <11>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <1024>;\n \t\t};\n \n \t\tcpu4: cpu@100 {\n@@ -85,6 +89,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <7>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <539>;\n \t\t};\n \n \t\tcpu5: cpu@101 {\n@@ -97,6 +102,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <7>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <539>;\n \t\t};\n \n \t\tcpu6: cpu@102 {\n@@ -109,6 +115,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <7>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <539>;\n \t\t};\n \n \t\tcpu7: cpu@103 {\n@@ -121,6 +128,7 @@\n \t\t\tcooling-min-level = <0>;\n \t\t\tcooling-max-level = <7>;\n \t\t\t#cooling-cells = <2>; /* min followed by max */\n+\t\t\tcapacity-dmips-mhz = <539>;\n \t\t};\n \t};\n };\n","prefixes":["2/4"]}