From: dirk.brandewie@gmail.com
To: kernel@vger.kernel.org, linux-pm@vger.kernel.org
Cc: dirk.brandewie@gmail.com,
Dirk Brandewie <dirk.j.brandewie@intel.com>,
stable@vger.kernel.org, dsmythies@telus.net
Subject: [PATCH] cpufreq/intel_pstate: Change to scale off of max P-state
Date: Thu, 18 Jul 2013 08:48:42 -0700 [thread overview]
Message-ID: <1374162523-2777-1-git-send-email-dirk.j.brandewie@gmail.com> (raw)
From: Dirk Brandewie <dirk.j.brandewie@intel.com>
Change to using max P-state instead of max turbo P-state. This change
resolves two issues.
On a quiet system intel_pstate can fail to respond to a load change.
https://bugzilla.kernel.org/show_bug.cgi?id=59481
On CPU SKUs that have a limited number of P-states and no turbo range
intel_pstate fails to select the highest available P-state.
This change is suitable for stable v3.9+
Reported-by: arjan@linux.intel.com
Reported-by: dsmythies@telus.net
Tested-by: arjan@linux.intel.com
Tested-by: dsmythies@telus.net
CC: stable@vger.kernel.org
CC: dsmythies@telus.net
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
---
drivers/cpufreq/intel_pstate.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 07f2840..6d6a0b4 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -103,10 +103,10 @@ struct pstate_adjust_policy {
static struct pstate_adjust_policy default_policy = {
.sample_rate_ms = 10,
.deadband = 0,
- .setpoint = 109,
- .p_gain_pct = 17,
+ .setpoint = 97,
+ .p_gain_pct = 20,
.d_gain_pct = 0,
- .i_gain_pct = 4,
+ .i_gain_pct = 0,
};
struct perf_limits {
@@ -468,12 +468,12 @@ static inline void intel_pstate_set_sample_time(struct cpudata *cpu)
static inline int intel_pstate_get_scaled_busy(struct cpudata *cpu)
{
int32_t busy_scaled;
- int32_t core_busy, turbo_pstate, current_pstate;
+ int32_t core_busy, max_pstate, current_pstate;
core_busy = int_tofp(cpu->samples[cpu->sample_ptr].core_pct_busy);
- turbo_pstate = int_tofp(cpu->pstate.turbo_pstate);
+ max_pstate = int_tofp(cpu->pstate.max_pstate);
current_pstate = int_tofp(cpu->pstate.current_pstate);
- busy_scaled = mul_fp(core_busy, div_fp(turbo_pstate, current_pstate));
+ busy_scaled = mul_fp(core_busy, div_fp(max_pstate, current_pstate));
return fp_toint(busy_scaled);
}
--
1.8.3.1
next reply other threads:[~2013-07-18 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 15:48 dirk.brandewie [this message]
2013-07-19 3:53 ` [PATCH] cpufreq/intel_pstate: Change to scale off of max P-state Viresh Kumar
2013-08-01 17:56 ` Guilherme Salazar
2013-08-20 18:37 ` Dirk Brandewie
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=1374162523-2777-1-git-send-email-dirk.j.brandewie@gmail.com \
--to=dirk.brandewie@gmail.com \
--cc=dirk.j.brandewie@intel.com \
--cc=dsmythies@telus.net \
--cc=kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).