lkml.org 
[lkml]   [2016]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] x86: Calculate MHz using APERF/MPERF for cpuinfo and scaling_cur_freq
    On Fri, Apr 01, 2016 at 12:37:00AM -0400, Len Brown wrote:
    > From: Len Brown <len.brown@intel.com>
    >
    > 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
    > over a measurement interval. The interval is
    > defined to be the time between successive reads
    > of the frequency on that processor, whether from
    > /proc/cpuinfo or from sysfs cpufreq/scaling_cur_freq.
    > As with previous methods of calculating MHz,
    > idle time is excluded.

    Is this really a semantic you want to pin down?

    Since we're looking at doing something like:

    lkml.kernel.org/r/20160303162829.GB6375@twins.programming.kicks-ass.net

    We could also just return cpu_khz * whatever fraction we store there,
    knowing it is something recent.

    \
     
     \ /
      Last update: 2016-04-01 11:02    [W:3.084 / U:0.920 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site