Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396194 > unrolled thread
| Started by | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| First post | 2016-05-07 01:50 +0200 |
| Last post | 2016-05-07 01:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3] intel_pstate: Use sample.core_avg_perf in get_avg_pstate() "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-05-07 01:50 +0200
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-05-07 01:50 +0200 |
| Subject | [PATCH 2/3] intel_pstate: Use sample.core_avg_perf in get_avg_pstate() |
| Message-ID | <rvXFn-6JF-7@gated-at.bofh.it> |
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Notice that get_avg_pstate() can use sample.core_avg_perf instead of
carrying the same division again, so make it do that.
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
@@ -1201,8 +1201,7 @@ static inline int32_t get_avg_frequency(
static inline int32_t get_avg_pstate(struct cpudata *cpu)
{
- return div64_u64(cpu->pstate.max_pstate_physical * cpu->sample.aperf,
- cpu->sample.mperf);
+ return fp_toint(cpu->pstate.max_pstate_physical * cpu->sample.core_avg_perf);
}
static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu)
Back to top | Article view | linux.kernel
csiph-web