Hi!
> +++ b/arch/x86/kernel/cpu/aperfmperf.c
> @@ -0,0 +1,76 @@
> +/*
> + * x86 APERF/MPERF KHz calculation
> + * Used by /proc/cpuinfo and /sys/.../cpufreq/scaling_cur_freq
Could we use some shorter filename here? cpu_mhz.c? mhz.c?
> +/*
> + * aperfmperf_snapshot_khz()
--
(english) http://www
Thanks for the comments.
Re: is this a useful semantic?
Yes, average MHz over an interval is significantly more useful than
a snapshot of the recent instantaneous frequency.
It is possible to convert the former into the later,
but it is not possible to reliably and efficiently convert the later
i
On Fri, Apr 01, 2016 at 11:30:48AM +0200, Stephane Gasparini wrote:
> The MSRs will not wrap that often.
Unless some yahoo goes and does WRMSR APERF .
I think we should handle that gracefully too, regardless of how "smart"
that move might be.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim you
On Fri, Apr 01, 2016 at 11:30:48AM +0200, Stephane Gasparini wrote:
> my comment was about your comment that MSR have wrapped however many times
>
Yes, and don't top post.
my comment was about your comment that MSR have wrapped however many times
> On Apr 1, 2016, at 10:03 AM, Peter Zijlstra wrote:
>
> That is; if userspace doesn't request a freq reading we can go without
> reading this for a very long time.
>
>> +
>> +rdmsrl(MSR_IA32_APERF, aperf);
>> +
On Fri, Apr 01, 2016 at 10:23:23AM +0200, Peter Zijlstra wrote:
>
> Trim your emails
>
> On Fri, Apr 01, 2016 at 10:16:42AM +0200, Stephane Gasparini wrote:
>
> > > That means these delta's can be arbitrarily large, in fact the MSRs can
> > > have wrapped however many times.
> >
> > 64 bits is
Trim your emails
On Fri, Apr 01, 2016 at 10:16:42AM +0200, Stephane Gasparini wrote:
> > That means these delta's can be arbitrarily large, in fact the MSRs can
> > have wrapped however many times.
>
> 64 bits is 18 446 744 073 709 551 615
>
> so even assuming a 10 GHz frequency if my math are
On Fri, Apr 01, 2016 at 12:37:00AM -0400, Len Brown wrote:
> From: Len Brown
>
> For x86 processors with APERF/MPERF and TSC,
> return meaningful and consistent MHz in
> /proc/cpuinfo and
> /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
>
> MHz is computed like so:
>
> MHz = base_MHz * d
—
Steph
> On Apr 1, 2016, at 10:03 AM, Peter Zijlstra wrote:
>
> On Fri, Apr 01, 2016 at 12:37:00AM -0400, Len Brown wrote:
>> diff --git a/arch/x86/kernel/cpu/aperfmperf.c
>> b/arch/x86/kernel/cpu/aperfmperf.c
>> new file mode 100644
>> index 000..9380102
>> --- /dev/null
>> +++ b/arch
On Fri, Apr 01, 2016 at 12:37:00AM -0400, Len Brown wrote:
> diff --git a/arch/x86/kernel/cpu/aperfmperf.c
> b/arch/x86/kernel/cpu/aperfmperf.c
> new file mode 100644
> index 000..9380102
> --- /dev/null
> +++ b/arch/x86/kernel/cpu/aperfmperf.c
> @@ -0,0 +1,76 @@
> +/*
> + * x86 APERF/MPERF KH
From: Len Brown
For x86 processors with APERF/MPERF and TSC,
return meaningful and consistent MHz in
/proc/cpuinfo and
/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
MHz is computed like so:
MHz = base_MHz * delta_APERF / delta_MPERF
MHz is the average frequency of the busy processor
ov
11 matches
Mail list logo