Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp442553imm; Thu, 6 Sep 2018 05:07:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZSlxFO4xEwBO3QFCiyIeIIbvqtAwpBxoJ/svMsXFehXO4EOZoi+nwrykB2e+RsJIa6C281 X-Received: by 2002:a17:902:8a97:: with SMTP id p23-v6mr2277716plo.21.1536235675008; Thu, 06 Sep 2018 05:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536235674; cv=none; d=google.com; s=arc-20160816; b=FKFSjKDf1m3SjQMP+CCYxDHrjit/yLkwmBvu759s/117RV1gm4qvhdI4VHGPGsryxG bQwZBi0343fQ4TUSWwp6NO4moPXmpiSpeGkfVVeEZBx+ngDH+IZgKgLzznu0F6aP4+cz 73rSf/9hCovaQG9+cp1Y26tAZrFWBIta7um8jMobhGoAV3oaBG8JnJeY6r1KNRteqMTH J1ezRT1x0h/Da8HqeOqLTtMS8xMlCerrGtBXT6FRs5kfMH0Fu+qStuVuy2OCQInxaTbP 9hFoSwTdKdyredwLIWAwsrqWzwrOoKBwTmbyPblaU0+vNtYjh1nfvUKmoRsoOiaC9Ik2 ObBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ydGLLPYqreS35N2e47Oiij05t/baxQje9PP/VMf7vVY=; b=AkGSyTy5PfnIwUm70OMdNHN1cMQ+kJEu1nmEJ/yLufLm1jE0UoeYrIqxyguXcFaeor J/tG/QVp8k8+FievwoDtWy2it98+rUouVIgReAn8LcSbRJdh8A//NELb95xRfdPymelc H/989LYb0NpICagvTD+R+9PVnd8r/qYLlumoxH+PNamxGUIYlAB4JNDo+M25dPRTsdTH zPnF5MrxIahtQySRPXO4pQNxcE2UbCvJameQDQ4wStlz3w0rozL8hezBGd4axFEUHa4q oIB2o1jGkc61l2HMi5U8gLuO1G695g80RTts6LY6J3fxEp2Dk0c5eFpMq3zD38ozOtuG cs+A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q20-v6si4876826pll.10.2018.09.06.05.07.38; Thu, 06 Sep 2018 05:07:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbeIFQlm (ORCPT + 99 others); Thu, 6 Sep 2018 12:41:42 -0400 Received: from mail.bootlin.com ([62.4.15.54]:53891 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbeIFQll (ORCPT ); Thu, 6 Sep 2018 12:41:41 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 0376222B08; Thu, 6 Sep 2018 14:06:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from qschulz (AAubervilliers-681-1-30-219.w90-88.abo.wanadoo.fr [90.88.15.219]) by mail.bootlin.com (Postfix) with ESMTPSA id 737DB22B01; Thu, 6 Sep 2018 14:06:19 +0200 (CEST) Date: Thu, 6 Sep 2018 14:06:17 +0200 From: Quentin Schulz To: Maxime Ripard Cc: Philipp Rossak , lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v3 30/30] ARM: sun8i: a83t: full range OPP tables and CPUfreq Message-ID: <20180906120617.gp6yswusnbgsm2eg@qschulz> References: <20180830154518.29507-1-embed3d@gmail.com> <20180830154518.29507-31-embed3d@gmail.com> <20180906072429.7qjwbbqsjlbskk6v@qschulz> <20180906114241.zuesfnxuoovxiig6@flea> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="a2viiwc2ql2s45nb" Content-Disposition: inline In-Reply-To: <20180906114241.zuesfnxuoovxiig6@flea> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --a2viiwc2ql2s45nb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Maxime, Philipp, On Thu, Sep 06, 2018 at 01:42:41PM +0200, Maxime Ripard wrote: > On Thu, Sep 06, 2018 at 01:39:43PM +0200, Philipp Rossak wrote: > > On 06.09.2018 09:24, Quentin Schulz wrote: > > > Hi Philipp, > > >=20 > > > On Thu, Aug 30, 2018 at 05:45:18PM +0200, Philipp Rossak wrote: > > > > Since we have now thermal trotteling enabeled we can now add the fu= ll > > > > range of the OPP table. > > > >=20 > > > That's not the reason why they were not added. > > >=20 > > > Please see commit 2db639d8c1663d7543c9ab5323383d94c8a76c63[1]. > > >=20 > > > Basically, you only want the OPPs which can work below or at the defa= ult > > > voltage of the CPU supply, because the CPU supply is specific to each > > > board. > > >=20 > > > If you set your CPU to work at a given frequency and the voltage isn't > > > updated (saying opp-microvolt =3D ; in DT isn't enough, you need > > > cpu-supply to be provided and functional), the CPU might just crash. > > >=20 > > > Without cpu-supply property, underclocking isn't effective in term of > > > thermal cooling or power saving. Overclocking is very, very, very lik= ely > > > to make the CPU crash. > > >=20 > > > It's not a very difficult thing to do to test if a given frequency wo= rk > > > well but it needs a specific test environment and it's a lengthy test, > > > you can have a look at those tools here[3] if you like. It's not beca= use > > > it works in a given test case that'll work on the long term under hea= vy > > > load and constant frequency changes. > > >=20 > > > For A83T, I already did it and the outcome is the patch in [1]. Same = for > > > A33. > > >=20 > > > So, if you want to use these three higher OPPs, you need to define th= em > > > in your board DTS and add the cpu-supply property. See what's done for > > > the A33 and more specifically the Sinlinx SinA33[2] as an example. > > >=20 > > > [1]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= /commit/?id=3D2db639d8c1663d7543c9ab5323383d94c8a76c63 > > > [2]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git= /tree/arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts > > > [3]http://linux-sunxi.org/Hardware_Reliability_Tests#CPU > > >=20 > > > Quentin > > >=20 > >=20 > > Hey Quentin, > >=20 > > thanks for your feedback! > >=20 > > Sounds like we will never be able to run the A83T on its maximum freque= ncy > > in mainline. > >=20 > > I will do some testing, during the next weeks/months when I have time. > > With the old Allwinner kernel I was able to run the A83T with its maxim= um > > frequency without any problems since my board is very good cooled. >=20 > You definitely can, but I think Quentin's point was to do it on a > per-board basis, not for all of the A83t boards at once. >=20 Yes, exactly. That's what we did for the Sinlinx SinA33. Just take inspiration from it. You can run the CPU at max frequency with the old Allwinner kernel because it most likely updates the CPU voltage. Let's say overheating is not an issue, you still need to have a way to overclock AND overvolt to the values in the OPP you're targetting. Your CPU won't be stable with just overclocking without overvolting it, trust me, I've been there. It can even be possible that the Allwinner BSP is only stable in your use case. The CPU voltage is specific to every board (cpu-supply property). So we do not declare the CPU frequencies that require overvolting since we cannot be sure a board will define the cpu-supply property and thus, be able to overvolt the CPU. So, though thermal throttling is an important feature because overheating the CPU too much will shut it down on the hardware level (among other consequences), it does not make the higher OPPs magically work without a valid and working cpu-supply. The link I gave you is an important piece of software to test the stability of a system under heavy load and a lot of frequency changes. It's important to know that because it works for you in your use case doesn't make it work in any use case. Testing with these pieces of software helps to cover more hardcore use cases but isn't perfect of course. That's a start though. Quentin --a2viiwc2ql2s45nb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEXeEYjDsJh38OoyMzhLiadT7g8aMFAluRGDkACgkQhLiadT7g 8aMnORAApDZcH+3ZY9PD7YAmeQ36va67+W1yL0BemFB39N9dWe8XF3SmdWAvv/uA fZIcFDvVHTlaSAqHBM2QIPooH17198fw7NmOepGdQvdi/oHS3fvzRnbsVjBz4g2d 8Z57jHmliSDkOOICuuY5ZIxSvJ7SvRjoDikWRRAyMSu/SNHvjY5BgVbOGpI4gbL6 KNz/nO1ttcMqJ9FzWR9A4HOBOuZ3/iQEqBl71G2Vm0nSUvGk1HmJepdDSWOZ+asq D2zsPPZjVMta8OQD63AHuGoYQ0QGzWb9aXp/lSjL12I95q9qwPHyXOkYZZPyYg9N H3unsasX3er/BaVqYau9p28xdjWXCNUxkom89c+HUlziD0XAvoVG/duab6iW0pBw 1MLacnEC7TBO14JxqAzdJStcNq/A5iMPk47RKkiWd5n9FAXNJDaS4CRQToZhsJ0A xhXj93edPze7x5L+HOyCCjMFEEpkTmAzySPmcPqL5++WvyyLIu/L0GMSi68vbzr4 30GTV28WMPGt1r5iVB9/acCcXugYBvA8QveYBuofwCOqXH5tJyjhFTFFGlGeTLV4 gJBLORNPoMsiqw+17R3+X++u/KeY0KAqf1jq7k+YWCBucU4MRyj/DKK0i4jZEDhC dtuUv1opdO5+j6MSohi0AZ3cOMr37NCiM0oSKh9e+A1igDZCwHk= =YQbm -----END PGP SIGNATURE----- --a2viiwc2ql2s45nb--