@Lukasz, @Rafael -- I have a question related to the energy model
in general. As far as I understand, the energy model describes
the performance-energy consumption tradeoff when a single CPU in
a performance domain is running. However, in reality, SoCs may
have thermal constraints, which would result in additional
constraints. For example, running all CPUs with the highest
frequency may not be possible. My question is this: does kernel
maintain and use such (thermal?) constraints?
That's true in real scenarios on mobile SoCs, running with max freq
on all CPUs is possible likely only for short period...
The Energy Model itself doesn't handle such situation. The code in
thermal framework and in Energy Aware Scheduler has feature to handle
it and know which top OPPs are not possible to be used.
Although, the EM in such situation is likely to be adjusted, because the
SoC temperature reaches high values. Especially if that heat was
generated by the GPU not CPUs themselves, then it's extra leakage will
be accounted and EM data modified in runtime.
Another scenario when the EM might be updated is when Middleware
will recognize a known 'scenario' e.g. long video conference
with camera in use (thus Image Signal Processor, which also can
heat the SoC, like GPU). Or a 'preferred profile' for light-weight
application using some HW decoding, e.g. video playback and
thus some CPUs are more preferred by EAS to be used in it (EM might
change the energy efficiency gently for such CPUs).