lkml.org 
[lkml]   [2017]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: cpuidle and cpufreq coupling?
From
Date
On 07/20/2017 07:45 AM, Peter Zijlstra wrote:
> On Thu, Jul 20, 2017 at 11:52:41AM +0200, Rafael J. Wysocki wrote:
>> On Thu, Jul 20, 2017 at 9:18 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>>> On 20-07-17, 01:17, Rafael J. Wysocki wrote:
>>>> On Thu, Jul 20, 2017 at 12:54 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> We have a particular ARM CPU design that is drawing quite a lot of
>>>>> current upon exit from WFI, and it does so in a way even before the
>>>>> first instruction out of WFI is executed. That means we cannot influence
>>>>> directly the exit from WFI other than by changing the state in which it
>>>>> would be previously entered because of this "dead" time during which the
>>>>> internal logic needs to ramp up back where it left.
>>>>>
>>>>> A naive approach to solving this problem because we have CPU frequency
>>>>> scaling available would be to do the following:
>>>>>
>>>>> - just before entering WFI, switch to a low frequency OPP
>>>>> - enter WFI
>>>>> - upon exit from WFI, ramp up the frequency back to e.g: highest OPP
>>>>>
>>>>> Some of the parts that I am not exactly clear on would be:
>>>>>
>>>>> - would that qualify as a cpuidle governor of some kind that ties in
>>>>> which cpufreq?
>>>>> - would using cpufreq_driver_fast_switch() be an appropriate API to use
>>>>> from outside
>
> Can your ARM part change OPP without scheduling? Because (for obvious
> reasons) the idle thread is not supposed to block.

I think it should be able to do that, but I am not sure that if I went
through the cpufreq API it would be that straight forward so I may have
to re-implement some of the frequency scaling logic outside of cpufreq
(or rather make the low-level parts some kind of library I guess).

\
 
 \ /
  Last update: 2017-07-21 00:57    [W:0.104 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site