Re: [PATCH v3] platform/x86: intel_pmc_core: transform Pkg C-state residency from TSC ticks into microseconds

2019-06-29 Thread Andy Shevchenko
On Wed, Jun 19, 2019 at 11:29 AM Harry Pan wrote: > > Refer to the Intel SDM Vol.4, the package C-state residency counters > of modern IA micro-architecture are all ticking in TSC frequency, > hence we can apply simple math to transform the ticks into microseconds. > i.e., > residency (ms) =

[PATCH v3] platform/x86: intel_pmc_core: transform Pkg C-state residency from TSC ticks into microseconds

2019-06-19 Thread Harry Pan
Refer to the Intel SDM Vol.4, the package C-state residency counters of modern IA micro-architecture are all ticking in TSC frequency, hence we can apply simple math to transform the ticks into microseconds. i.e., residency (ms) = count / tsc_khz residency (us) = count / tsc_khz * 1000 This also