On Tue, Jun 22, 2021 at 9:59 AM Lukasz Luba <lukasz.luba@xxxxxxx> wrote:
The Active Stats framework tracks and accounts the activity of the CPU
for each performance level. It accounts the real residency,
No, it doesn't. It just measures the time between the entry and exit
and that's not the real residency (because it doesn't take the exit
latency into account, for example).
when the CPU was not idle, at a given performance level. This patch adds needed calls
which provide the CPU idle entry/exit events to the Active Stats
framework.
And it adds overhead to overhead-sensitive code.
AFAICS, some users of that code will not really get the benefit, so
adding the overhead to it is questionable.
First, why is the existing instrumentation in the idle loop insufficient?
Second, why do you need to add locking to this code?