Thread (16 messages) 16 messages, 3 authors, 2021-08-26

Re: [PATCH v5 7/8] cpufreq: Read inefficiencies from EM

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-08-26 10:39:31

On 26-08-21, 11:35, Vincent Donnefort wrote:
But it looks like a weird back and forth between EM and CPUFreq:

 cpufreq driver -> register EM -> sets inefficiencies back into cpufreq.

It creates a dependency loop:  cpufreq -> EM -> cpufreq

While this version is more straightforward:

 cpufreq driver -> register EM
                -> apply inefficiencies from EM into cpufreq.
The problem is there there is no good place for cpufreq core to call
cpufreq_update_efficiencies(). It may look correct to call it right after the EM
callback is called in the current scenario, but it isn't.

As I said earlier, there can be other stuff later on which can set inefficient
frequencies, not just EM. So they better make these calls.
Also, I'm not sure how em_dev_register_perf_domain() can access the cpufreq
policy while the latter hasn't finished initialized.
It is initialized enough at this point so that you can call cpufreq_cpu_get() to
get the policy, that was the whole point of my series which added register_em().

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help