I am using acpi_cpufreq driver. Please help me to understand why average frequency counted from time_in_state as:
For each line in time_in_state file:
1) Read line from time_in_state file, get frequency: freq
2) Get delta time betwen previous and current reading: delta_times
3) total_freq_times += freq*delta_times
4) total_times += delta_times
Average frequency = total_freq_times/total_times
and average frequency collected from i7z tool or by reading msr registers are not equal at the border when turbo boost is on?
I understand that first line frequency in time_in_state represents turbo mode and it is 1996000 in my case.
I run balanced load on CPU an see cpu usage ~70-80%. When i count average frequency by time_in_state i get 1899249.88 (and i see no increment at first line counter in time_in_state), but when i read msr or watching by i7z tool i see 2129067.50.
According i7z CPU already in turbo mode but time_in_state shows not...
Can somebody explain?