Rafael.Vanoni wrote:
> Rafael Vanoni wrote:
>> Li, Aubrey wrote:
>>> Li, Aubrey wrote:
>>>
>>>> My system is in idle when this report was obtained.
>>>>
>>>> I'll investigate it and let you know what's going on.
>>>>
>>> hmm..., the problem is when pt_cpuidle_stat_collect()
>>> calculate C0 residency, it always counts all cpus up.
>>>
>>> pt_cpuidle_stat_collect(double interval)
>>> {
>>> ----snip----
>>> /*
>>> * Assume that all the time spent in this interval will
>>> * be the default "0" state. The DTrace walker will
>>> reallocate
>>> * time out of the default bucket as it processes
>>> aggregation
>>> * records for time spent in other states.
>>> */
>>> g_cstate_info[0].total_time = (long)(interval * g_ncpus *
>>> 1000); ----snip---- }
>>>
>>> When we use -c option, C0 should be calculated only on the specific
>>> CPU. So, here, g_ncpus is not fit for the -c option.
>>>
>>> Does this make sense? Do you always test powertop on one logical
>>> core system?
>
> Here's another patch with some new changes to cpufreq.c. Let me know
> what you think.
>
This patch looks good, please commit.
Thanks,
-Aubrey