Re: [PATCH V3 2/2] thermal: cpufreq_cooling: Reuse sched_cpu_util() for SMP platforms

From: Valentin Schneider
Date: Tue Dec 01 2020 - 12:26:37 EST



Hi Viresh,

On 19/11/20 07:38, Viresh Kumar wrote:
> As can be clearly seen, the load and requested_power numbers are simply
> incorrect in the idle time based approach and the numbers collected from
> CPU's utilization are much closer to the reality.
>

PELT time-scaling can make the util signals behave strangely from an
external PoV. For instance, on a big.LITTLE system, the rq util of a LITTLE
CPU may suddenly drop if it was stuck on a too-low OPP for some time and
eventually reached the "right" OPP (i.e. got idle time).

Also, as Peter pointed out in [1], task migrations can easily confuse an
external observer that considers util to be "an image of the recent past".

This will need testing on asymmetric CPU capacity systems, IMO.

[1]: https://lore.kernel.org/r/20201120075527.GB2414@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx