linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukasz Luba <llu.ker.dev@gmail.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Ionela Voinescu <ionela.voinescu@arm.com>,
	Punit Agrawal <punit.agrawal@arm.com>,
	Eduardo Valentin <edubezval@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Amit Daniel Kachhap <amit.kachhap@gmail.com>,
	Javi Merino <javi.merino@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Javi Merino <javi.merino@arm.com>
Subject: Re: [PATCH 4/4] cpu_cooling: Drop static-power related stuff
Date: Tue, 21 Nov 2017 18:03:23 +0100	[thread overview]
Message-ID: <5A145C5B.5060800@gmail.com> (raw)
In-Reply-To: <CAKfTPtBBSxV+weYf-9yTf9azc78--8a8x8wNad3OGCYfvEJ4qw@mail.gmail.com>

Hi Vincent,

On 21/11/17 17:08, Vincent Guittot wrote:
> Hi Lukasz
>
> On 21 November 2017 at 16:56, Lukasz Luba <llu.ker.dev@gmail.com> wrote:
>> 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}
>
> You forgot one main contributor of static leakage: the temperature

Yes, so basically, the relation between temperature and the power
is exponential. The power doubles every 20deg.
You can find this model for static power for Mali GPU:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/stabilize-8743.60.B-chromeos-4.4/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_power_model_simple.c#37

There is a polynomial which approximates it for gpu (starting from
line 56).

>
>>
>> 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.
>
> But can't we linearized around the target temp ? that were we want to
> be accurate

I would also add: 'around the target temp' and starting at least from
IPA enable trip point (so i.e. from 55degC to 75degC + margin)
I would have to simulate it and see some results to see error values.
Of course it would be better that having no static power at all,
but the vendors would have create a tool which calculates the factors
and put them to DT.

Regards,
Lukasz

  parent reply	other threads:[~2017-11-21 17:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15  9:19 [PATCH 0/4] cpu_cooling: cooling dev registration cleanups Viresh Kumar
2017-11-15  9:19 ` [PATCH 1/4] cpu_cooling: Make of_cpufreq_power_cooling_register() parse DT Viresh Kumar
2017-11-15  9:19 ` [PATCH 2/4] cpu_cooling: Remove unused cpufreq_power_cooling_register() Viresh Kumar
2017-11-15  9:19 ` [PATCH 3/4] cpu_cooling: Keep only one of_cpufreq*cooling_register() helper Viresh Kumar
2017-11-15  9:19 ` [PATCH 4/4] cpu_cooling: Drop static-power related stuff Viresh Kumar
2017-11-15 10:18   ` Daniel Lezcano
2017-11-15 11:25     ` Viresh Kumar
2017-11-15 15:43     ` Eduardo Valentin
2017-11-15 18:17       ` Rafael J. Wysocki
2017-11-15 18:20         ` Eduardo Valentin
2017-11-16 15:02           ` Ionela Voinescu
2017-11-16 15:20             ` Viresh Kumar
2017-11-16 23:31               ` Rafael J. Wysocki
2017-11-16 23:44                 ` Eduardo Valentin
2017-11-17 11:02                   ` Punit Agrawal
2017-11-17 11:06                     ` Viresh Kumar
2017-11-21 11:30                     ` Ionela Voinescu
2017-11-21 13:06                       ` Daniel Lezcano
2017-11-21 15:56                         ` Lukasz Luba
2017-11-21 16:08                           ` Vincent Guittot
2017-11-21 16:57                             ` Eduardo Valentin
2017-11-21 18:00                               ` Javi Merino
2017-11-21 18:05                                 ` Daniel Lezcano
2017-11-21 18:13                                   ` Eduardo Valentin
2017-11-21 23:32                                     ` Lukasz Luba
2017-11-21 18:12                                 ` Eduardo Valentin
2017-11-22 10:59                                   ` Sudeep Holla
2017-11-22 11:10                                     ` Viresh Kumar
2017-11-22 11:17                                       ` Sudeep Holla
2017-11-22 15:38                                       ` Eduardo Valentin
2017-11-22 15:34                                     ` Eduardo Valentin
2017-11-22 16:04                                       ` Sudeep Holla
2017-11-22  1:25                                 ` Viresh Kumar
2017-11-22 11:08                                   ` Viresh Kumar
2017-11-21 17:03                             ` Lukasz Luba [this message]
2017-11-21 17:09                       ` Eduardo Valentin
2017-11-21 17:49                         ` Daniel Lezcano
2017-11-16  2:47         ` Viresh Kumar
2017-11-17  7:55           ` Daniel Lezcano
2017-11-15 11:31   ` Javi Merino
2017-11-15 11:39     ` Daniel Lezcano
2017-11-15 15:09       ` Eduardo Valentin
2017-11-15 18:08 ` [PATCH 0/4] cpu_cooling: cooling dev registration cleanups Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A145C5B.5060800@gmail.com \
    --to=llu.ker.dev@gmail.com \
    --cc=amit.kachhap@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=ionela.voinescu@arm.com \
    --cc=javi.merino@arm.com \
    --cc=javi.merino@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=mingo@redhat.com \
    --cc=punit.agrawal@arm.com \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=rui.zhang@intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).