From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751290AbdKUP4k (ORCPT ); Tue, 21 Nov 2017 10:56:40 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35256 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbdKUP4i (ORCPT ); Tue, 21 Nov 2017 10:56:38 -0500 X-Google-Smtp-Source: AGs4zMYwDnNXVb/iBXUBdmXc6X7VvK2xl0QBqUkoH/UGvaTUfC3g5G7ATGe8FIOr7mGXbGfjddtnKQ== Message-ID: <5A144CB3.50806@gmail.com> Date: Tue, 21 Nov 2017 16:56:35 +0100 From: Lukasz Luba User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Daniel Lezcano , Ionela Voinescu , Punit Agrawal , Eduardo Valentin CC: "Rafael J. Wysocki" , Viresh Kumar , "Rafael J. Wysocki" , Amit Daniel Kachhap , Javi Merino , Zhang Rui , Steven Rostedt , Ingo Molnar , Linux PM , Vincent Guittot , lukasz.luba@arm.com, Linux Kernel Mailing List , Javi Merino Subject: Re: [PATCH 4/4] cpu_cooling: Drop static-power related stuff References: <65fef2a1-d23f-3de2-bd91-021296c3e2f7@arm.com> <20171116152058.GR3257@vireshk-i7> <2810372.fJ2vMN0cWO@aspire.rjw.lan> <20171116234422.GA6141@localhost.localdomain> <878tf5tbfj.fsf@e105922-lin.cambridge.arm.com> <35d3751d-f28d-38c2-02b2-c9980f11c52e@arm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/11/17 14:06, Daniel Lezcano wrote: > On 21/11/2017 12:30, Ionela Voinescu wrote: > > [ ... ] > >> A DT model would be easy to support with the current code but it would >> be very inaccurate. > > Why ? > > [ ... ] > Hi all, The DT solution won't fly, the reason can be found below. I agree with Ionela and Punit that the Juno board is not the best platform to test the static power impact on IPA. In some other platforms the static power can be 50% or more of the total power, so it cannot be neglected. These are the issues. The static power equation is complicated, here is one known to me. The leakage function is exponentially influenced by current circuit supply voltage, body-bias and some constants K_{4,5}. P_{leak} = L_{g}*V_{dd}*K_{3}*e^{K_{4}*V_{dd}}*e^{K_{5}*V_{bs}}+| V_{bs}|*I_{Ju} It can also vary depending on technology (CMOS, FinFET, etc). It would be really hard to approximate by i.e. a polynomial function with inputs from DT. One size does not fit all. The equation can also tell you some interesting things about the manufacturing process. Exposing such information might be the last thing the vendors want to. That's why the vendors might want to implement whole thermal management in the firmware or skip static power and rely on IPA adaptation. They can also use a different api in IPA, when they have some mechanism to measure power in firmware, it can be feed into IPA. Anyway, I would recommend to keep it as is, to have a complete power model in the kernel. The code without static power routines looks awkward to me. From my side - NACK for the patch which removes static power. Regards, Lukasz Luba