Skip to contentSkip to conversation

New: intel_pstate synchronizes frequencies on wake from suspend

Bug 59781 [email protected] 1 participant 12 messages Jun 16, 2013 – Jul 8, 2013 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=59781

Summary: intel_pstate synchronizes frequencies on wake from
suspend
Product: Power Management
Version: 2.5
Kernel Version: 3.10.0rc5, 3.10.0rc6
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: cpufreq
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: No

Created an attachment (id=104841)
--> (https://bugzilla.kernel.org/attachment.cgi?id=104841)
Behavior before suspend

When 1st boot both my core's frequencies change independently, but once i wake from suspend they are synchronized
~$ uname -r # http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10-rc6-saucy/
3.10.0-031000rc6-generic

$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver 
intel_pstate
intel_pstate
$ cat /sys/devices/system/cpu/cpu*/cpuidle/driver/name 
intel_idle
intel_idle
$ cat /proc/cpuinfo # Only showing one core
processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 42
model name    : Intel(R) Pentium(R) CPU B970 @ 2.30GHz
stepping    : 7
microcode    : 0x23
cpu MHz        : 1242.000
cache size    : 2048 KB
physical id    : 0
siblings    : 2
core id        : 1
cpu cores    : 2
apicid        : 2
initial apicid    : 2
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr
pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave lahf_lm arat epb
xsaveopt pln pts dtherm
bogomips    : 4589.55
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:
Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#1 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

https://bugzilla.kernel.org/show_bug.cgi?id=59781

--- Comment #1 from [email protected] 2013-06-16 16:12:40 --- Created an attachment (id=104851)
--> (https://bugzilla.kernel.org/attachment.cgi?id=104851)
Behavior after suspend

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#2 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

Lan Tianyu <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |NEEDINFO
                 CC|                            |[email protected]

--- Comment #2 from Lan Tianyu <[email protected]> 2013-06-17 06:59:32 --- Does this work on older kernel?

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

--- Comment #3 from [email protected] 2013-06-17 11:37:34 --- In 3.10.0rc4 it behaved like it does after suspend at 1st boot I don't believe intel_pstate was enabled for my cpu prior to 3.10 This is why I did not mark this as a regression
if you are asking if this happened with the older scaling driver that used ondemand, it did not as far as I am aware

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#4 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

--- Comment #4 from [email protected] 2013-06-17 11:42:46 --- This is the script I used to get the attached charts
http://pastebin.com/PYj4wwCj
it uses /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq to get the current cpu frequency

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#5 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

Dirk Brandewie <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #5 from Dirk Brandewie <[email protected]> 2013-06-17 17:15:25 --- Could you use turbostat to collect data on the good and bad state please.

Does this happen all the time? There are a number of bugs open where both intel_pstate and ondemand are doing weird things after coming out of suspend. I the other bugs the situation would clear sometimes after a number of suspend/resume cycles.

If you could see if this happens without intel_pstate it would be helpful

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#6 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

--- Comment #6 from [email protected] 2013-06-18 01:19:42 --- Strange when using acpi-cpufreq's ondemand setting cpuinfo_cur_freq is synchronized, but scaling_cur_freq is not
That is under the 3.9.0 kernel

~$ turbostat
turbostat_3.9.0-030900 not found
You may need to install linux-tools-3.9.0-030900

there is no such package...

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#7 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

--- Comment #7 from Lan Tianyu <[email protected]> 2013-06-18 02:42:14 --- Please go to (kernel source)/tools/power/x86/turbostat/
run "make && make install"
And then try again.

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#8 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

Toralf Förster <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #8 from Toralf Förster <[email protected]> 2013-06-18 12:10:31 --- /me wonders whether an issue at my system is connected to this bug report too.

I'm using the ondemand governor at a ThinkPad T420 with a i5 (4 cores, 2.6 GHz max frequency, boost at 3.1 GHz). Since kernel 3.10-rcX I've to define "intel_pstate=disable" at the kernel command line to force using the acpi driver (P-State does not know anything about niced processes ...)

Now the problem:
After s2ram and wakeup I notice a higher temperatur and fan noise and realized, that 3 of 4 cpu cores runs constantly at 2.6 GHz (cpu1-3, cpu0 were at the expected 800 MHz for low load) - independend from the load. I've to explicitely set the max freq to 2.4 GHz and back to 2.6 GHz. Then the current frequency was scaled accordingly to the load.

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#9 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

--- Comment #9 from [email protected] 2013-06-18 16:23:52 --- After suspend:
http://pastebin.com/raw.php?i=JbZmBNrS

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#10 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

--- Comment #10 from [email protected] 2013-06-18 16:29:45 --- Before suspend:
http://pastebin.com/raw.php?i=75bvfLij

Signature · 3 lines
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#11 lore raw

[Bug 59781] intel_pstate synchronizes frequencies on wake from suspend

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=59781

Lan Tianyu <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|[email protected] |[email protected]

--- Comment #11 from Lan Tianyu <[email protected]> ---
Hi:
Sorry for later response. Please try the following patch. I guess this will
fix your issue. I found this issue also on one of my machine.
---

 drivers/cpufreq/cpufreq_stats.c |    1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq_stats.c +0 -0
index fb65dec..591b6fb 100644
@@ -349,6 +349,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct

notifier_block *nfb,

        switch (action) {
        case CPU_ONLINE:
+       case CPU_ONLINE_FROZEN:
                cpufreq_update_policy(cpu);
                break;
        case CPU_DOWN_PREPARE:
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.