On Mon, Apr 09, 2018 at 02:45:11PM +0100, Quentin Perret wrote: > In this specific patch, we are basically trying to figure out the > boundaries of frequency domains, and the power consumed by each CPU > at each OPP, to make them available to the scheduler. The important > thing here is that, in both cases, we rely on the OPP library to > keep the code as platform-agnostic as possible.
AFAICT the only users of this PM_OPP stuff is a bunch of ARM platforms. Granted, body else has build a big.little style system, so that might all be fine I suppose. It won't be until some !ARM chip comes along that we'll know how generically usable any of this really is. > In the case of the frequency domains for example, the cpufreq driver is > in charge of specifying the CPUs that are sharing frequencies. That > information can come from DT, or SCPI, or SCMI, or whatever -- we > probably shouldn't have to care about that from the scheduler's > standpoint. That's why using dev_pm_opp_get_sharing_cpus() is handy, > the OPP library gives us the digested information we need. So I kinda would've expected to just ask cpufreq, that after all already knows these things. Why did we need to invent this pm_opp thing? Cpufreq has a tons of supported architectures, pm_opp not so much. > The power values (dev_pm_opp_get_power) we use right now are those > already used by the thermal subsystem (IPA), which means we don't have I love an IPA style beer, but I'm thinking that's not the same IPA, right :-) > to introduce any new DT binding whatsoever. In a close future, the power > values could also come from other sources (SCMI for ex), and again it's > probably not the scheduler's job to care about those things, so the OPP > library is helping us again. As mentioned in the notes, as of today, this > approach has dependencies on other patches relating to these things which > are already on the list . Is there any !ARM thermal driver? (clearly I'm not up-to-date on things thermal).