Re: [PATCH 2/4] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF

2017-06-23 Thread Len Brown
On Tue, Jun 20, 2017 at 6:15 AM, Thomas Gleixner wrote: > On Fri, 16 Jun 2017, Len Brown wrote: >> +#include >> +#include >> +#include >> +#include >> + >> +struct aperfmperf_sample { >> + unsigned int khz; >> + unsigned long jiffies; >> + u64 aperf; >> +

Re: [PATCH 2/4] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF

2017-06-23 Thread Len Brown
On Tue, Jun 20, 2017 at 6:15 AM, Thomas Gleixner wrote: > On Fri, 16 Jun 2017, Len Brown wrote: >> +#include >> +#include >> +#include >> +#include >> + >> +struct aperfmperf_sample { >> + unsigned int khz; >> + unsigned long jiffies; >> + u64 aperf; >> + u64 mperf; > > Nit.

Re: [PATCH 2/4] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF

2017-06-20 Thread Thomas Gleixner
On Fri, 16 Jun 2017, Len Brown wrote: > +#include > +#include > +#include > +#include > + > +struct aperfmperf_sample { > + unsigned int khz; > + unsigned long jiffies; > + u64 aperf; > + u64 mperf; Nit. Please write these in tabular fashion: unsignedint khz;

Re: [PATCH 2/4] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF

2017-06-20 Thread Thomas Gleixner
On Fri, 16 Jun 2017, Len Brown wrote: > +#include > +#include > +#include > +#include > + > +struct aperfmperf_sample { > + unsigned int khz; > + unsigned long jiffies; > + u64 aperf; > + u64 mperf; Nit. Please write these in tabular fashion: unsignedint khz;

[PATCH 2/4] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF

2017-06-16 Thread Len Brown
From: Len Brown The goal of this change is to give users a uniform and meaningful result when they read /sys/...cpufreq/scaling_cur_freq on modern x86 hardware, as compared to what they get today. Modern x86 processors include the hardware needed to accurately calculate

[PATCH 2/4] x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF

2017-06-16 Thread Len Brown
From: Len Brown The goal of this change is to give users a uniform and meaningful result when they read /sys/...cpufreq/scaling_cur_freq on modern x86 hardware, as compared to what they get today. Modern x86 processors include the hardware needed to accurately calculate frequency over an