lkml.org 
[lkml]   [2017]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/16] cpufreq: intel_pstate: Set HWP sampling interval once
Date
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

In the HWP enabled case pid_params.sample_rate_ns only needs to be
updated once, because it is global, so do that when setting hwp_active
instead of doing it during the initialization of every CPU.

Moreover, pid_params.sample_rate_ms is never used if HWP is enabled,
so do not update it at all then.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/intel_pstate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Index: linux-pm/drivers/cpufreq/intel_pstate.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/intel_pstate.c
+++ linux-pm/drivers/cpufreq/intel_pstate.c
@@ -1911,8 +1911,6 @@ static int intel_pstate_init_cpu(unsigne
intel_pstate_disable_ee(cpunum);

intel_pstate_hwp_enable(cpu);
- pid_params.sample_rate_ms = 50;
- pid_params.sample_rate_ns = 50 * NSEC_PER_MSEC;
}

intel_pstate_get_cpu_pstates(cpu);
@@ -2563,6 +2561,7 @@ static int __init intel_pstate_init(void
} else {
hwp_active++;
intel_pstate.attr = hwp_cpufreq_attrs;
+ pid_params.sample_rate_ns = 50 * NSEC_PER_MSEC;
goto hwp_cpu_matched;
}
} else {
\
 
 \ /
  Last update: 2017-03-28 00:47    [W:0.076 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site