Most recent kernel where this bug did not occur: unkown Distribution: Gentoo Linux Hardware Environment: IBM Thinkpad T43 Software Environment: Problem Description: cpufreq_conservative doesn't scale CPU frequency anymore after wakeup from suspend to disk, instead CPU runs always with the highest available frequency. Scaling driver is acpi-cpufreq. Steps to reproduce: Choose cpufreq_conservative as scaling driver and execute "echo disk > /sys/power/state".
aaaah, maybe that's because CPU1 is offlined and when resumed .init is called which sets the CPUFREQ_DEFAULT_GOVERNOR. In fact after resume CPU1 has the performance governor here, could you check it's the case for you as well? Any suggestion on how to solve that? Maybe cpufreq_add_dev should set the CPU0 policy as default when other CPUs are up-ed?
eerm, in fact that's a one processor system and /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor says that the conservative governer is active for CPU0. /proc/cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 13 model name : Intel(R) Pentium(R) M processor 2.00GHz stepping : 8 cpu MHz : 800.000 cache size : 2048 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx est tm2 bogomips : 1597.58 clflush size : 64
ops :) does it happen with ondemand as well? would you mind setting cpufreq debug=7 echo 7 > /sys/module/cpufreq/parameters/debug perform a suspend/resume cycle and attach the log? thanks
this is the debug log for cpufreq_conservative: cpufreq-core: suspending cpu 0 swsusp: critical section: swsusp: Need to copy 14851 pages Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. cpufreq-core: resuming cpu 0 cpufreq-core: Warning: CPU frequencyis 2000000, cpufreq assumed 800000 kHz. cpufreq-core: scaling loops_per_jiffy to 7987872for frequency 2000000 kHz cpufreq-core: handle_update for cpu 0 called cpufreq-core: updating policy for CPU 0 cpufreq-core: setting new policy for CPU 0: 800000 - 2000000 kHz cpufreq-core: new min and max freqs are 800000 - 2000000 kHz cpufreq-core: governor: change or update limits cpufreq-core: __cpufreq_governor for CPU 0, event 3
ondemand seems to work well.
Created attachment 11881 [details] Keep policy->user_policy in sync and use CPU0 policy as a template for other CPUs policy when up-ed
Markus, does the attached patch fixes it for you?
No, the patch doesn't change anything (tested on 2.6.22-rc6).
Created attachment 11884 [details] Restore previously used governor on a hot-replugged CPU Can you try this one, pls.
Yepp, the patch from Thomas works.
Comment on attachment 11881 [details] Keep policy->user_policy in sync and use CPU0 policy as a template for other CPUs policy when up-ed looks like Tomas had a better (and working) fix
*** This bug has been marked as a duplicate of bug 7216 ***
Sorry, wrong field.
(In reply to comment #9) > Created an attachment (id=11884) [details] > Restore previously used governor on a hot-replugged CPU Can you please tell me what the status of this patch is?
It's in Linus' tree for 2.6.23