From: Philippe Longepe <philippe.longepe@linux.intel.com>
To: linux-pm@vger.kernel.org
Cc: srinivas.pandruvada@linux.intel.com, rafael@kernel.org
Subject: [PATCH V5 3/4] Move the intel_pstate_calc_busy into get_target_pstate_use_performance
Date: Sun, 6 Mar 2016 08:34:05 +0100 [thread overview]
Message-ID: <1457249646-23072-4-git-send-email-philippe.longepe@linux.intel.com> (raw)
In-Reply-To: <1457249646-23072-1-git-send-email-philippe.longepe@linux.intel.com>
The cpu_load algorithm doesn't need to invoke intel_pstate_calc_busy(),
so move that call from intel_pstate_sample() to
get_target_pstate_use_performance().
Signed-off-by: Philippe Longepe <philippe.longepe@linux.intel.com>
---
drivers/cpufreq/intel_pstate.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index c46d23a..903341f 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -912,8 +912,6 @@ static inline void intel_pstate_sample(struct cpudata *cpu, u64 time)
cpu->sample.mperf -= cpu->prev_mperf;
cpu->sample.tsc -= cpu->prev_tsc;
- intel_pstate_calc_busy(cpu);
-
cpu->prev_aperf = aperf;
cpu->prev_mperf = mperf;
cpu->prev_tsc = tsc;
@@ -942,7 +940,6 @@ static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu)
mperf = cpu->sample.mperf + delta_iowait_mperf;
cpu->prev_cummulative_iowait = cummulative_iowait;
-
/*
* The load can be estimated as the ratio of the mperf counter
* running at a constant frequency during active periods
@@ -960,6 +957,8 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu)
int32_t core_busy, max_pstate, current_pstate, sample_ratio;
u64 duration_ns;
+ intel_pstate_calc_busy(cpu);
+
/*
* core_busy is the ratio of actual performance to max
* max_pstate is the max non turbo pstate available
--
1.9.1
next prev parent reply other threads:[~2016-03-06 7:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-06 7:34 [PATCH V5 0/4] Reduce the intel_pstate timer overhead Philippe Longepe
2016-03-06 7:34 ` [PATCH V5 1/4] Remove extra conversions in pid calculation Philippe Longepe
2016-03-07 21:30 ` Srinivas Pandruvada
2016-03-06 7:34 ` [PATCH V5 2/4] Optimize calculation for max/min_perf_adj Philippe Longepe
2016-03-07 21:35 ` Srinivas Pandruvada
2016-03-06 7:34 ` Philippe Longepe [this message]
2016-03-07 21:36 ` [PATCH V5 3/4] Move the intel_pstate_calc_busy into get_target_pstate_use_performance Srinivas Pandruvada
2016-03-06 7:34 ` [PATCH V5 4/4] intel_pstate: Remove the freq calculation from the intel_pstate_calc_busy function Philippe Longepe
2016-03-07 21:42 ` Srinivas Pandruvada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457249646-23072-4-git-send-email-philippe.longepe@linux.intel.com \
--to=philippe.longepe@linux.intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.