Bug 61241
Summary: | CPU frequency is stuck after suspend/resume using the intel_pstate driver on a Sandy Bridge CPU | ||
---|---|---|---|
Product: | Power Management | Reporter: | Patrick Bartels (petzicus) |
Component: | Other | Assignee: | Dirk Brandewie (dirk.brandewie) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | aaron.lu, rui.zhang, tianyu.lan |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.11.0 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Patrick Bartels
2013-09-12 12:18:44 UTC
Hi: This is a regression? Please provide the output of "grep. /sys/bus/cpu/devices/cpu*/cpufreq/*" with root privilege. I suppose you meant cat instead of "grep."?! Here's the output (after having done a suspend/resume): root ~ # cat /sys/bus/cpu/devices/cpu*/cpufreq/* 0 784000 3500000 800000 4294967295 0 performance powersave intel_pstate powersave 3500000 800000 <unsupported> 1 784000 3500000 800000 4294967295 1 performance powersave intel_pstate powersave 1900000 800000 <unsupported> 2 784000 3500000 800000 4294967295 2 performance powersave intel_pstate powersave 1500000 800000 <unsupported> 3 784000 3500000 800000 4294967295 3 performance powersave intel_pstate powersave 1100000 800000 <unsupported> Sorry for later response. Could you check this on the v3.12-rc1? The intel pstate driver worked on x220 at last v3.9.3 from other reporter who tested on x220i . I guess this is triggered by recent change. https://bugzilla.kernel.org/show_bug.cgi?id=58531 Hi there, I've just tested 3.12-rc1 but there's no improvement. After a resume CPU frequency is still locked to 800 MHz and I cannot tweak the max_perf_pct value until I reboot. I have reproduced this bug a fix will follow shortly Please try the following patch: commit a54717512211712e79604aa319a3100d5ff8baa0 Author: Dirk Brandewie <dirk.j.brandewie@intel.com> Date: Mon Oct 14 08:53:55 2013 -0700 cpfreq/intel_pstate: Fix max_perf_pct on resume If the system is suspended while max_perf_pct is less than 100 percent or no_turbo set policy->{min,max} will be set incorrectly with scaled values which turn the scaled values into hard limits. Signed-off-by: Dirk Brandewie <dirk.j.brandewie@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 32b3479..3335f55 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -652,9 +652,8 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy) else policy->policy = CPUFREQ_POLICY_POWERSAVE; - intel_pstate_get_min_max(cpu, &min_pstate, &max_pstate); - policy->min = min_pstate * 100000; - policy->max = max_pstate * 100000; + policy->min = cpu->pstate.min_pstate * 100000; + policy->max = cpu->pstate.turbo_pstate * 100000; /* cpuinfo and default policy values */ policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000; Hi there, I've been running a patched kernel with lots of suspends today. The patch has solved the issue. Thanks! commit 52e0a509e5d6f902ec26bc2a8bb02b137dc453be Author: Dirk Brandewie <dirk.j.brandewie@intel.com> Date: Tue Oct 15 11:06:14 2013 -0700 cpufreq / intel_pstate: Fix max_perf_pct on resume Entered Linus' tree as of v3.12-rc6. |