lkml.org 
[lkml]   [2019]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/2] cpufreq: intel_pstate: Conditional frequency invariant accounting
    Date
    From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

    From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

    intel_pstate has two operating modes: active and passive. In "active"
    mode, the in-built scaling governor is used and in "passive" mode,
    the driver can be used with any governor like "schedutil". In "active"
    mode the utilization values from schedutil is not used and there is
    a requirement from high performance computing use cases, not to read
    any APERF/MPERF MSRs. In this case no need to use CPU cycles for
    frequency invariant accounting by reading APERF/MPERF MSRs.
    With this change frequency invariant account is only enabled in
    "passive" mode.

    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: Giovanni Gherdovich <ggherdovich@suse.cz>
    ---
    drivers/cpufreq/intel_pstate.c | 5 +++++
    1 file changed, 5 insertions(+)

    diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
    index cc27d4c59dca..d55da8604d50 100644
    --- a/drivers/cpufreq/intel_pstate.c
    +++ b/drivers/cpufreq/intel_pstate.c
    @@ -2381,6 +2381,8 @@ static int intel_pstate_register_driver(struct cpufreq_driver *driver)
    {
    int ret;

    + x86_arch_scale_freq_tick_disable();
    +
    memset(&global, 0, sizeof(global));
    global.max_perf_pct = 100;

    @@ -2393,6 +2395,9 @@ static int intel_pstate_register_driver(struct cpufreq_driver *driver)

    global.min_perf_pct = min_perf_pct_min();

    + if (driver == &intel_cpufreq)
    + x86_arch_scale_freq_tick_enable();
    +
    return 0;
    }

    --
    2.16.4
    \
     
     \ /
      Last update: 2019-09-09 04:38    [W:3.553 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site