2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Hi everybody,
Since 2.6.18-rc1, up to and including -rc3, cpufreq has died on me. It worked fine in 2.6.16.9.
The whole cpufreq hierarchy in /sys/ is missing, nothing is reported during bootup mentioning 'cpufreq', and when I build with all the cpufreq stuff configured as modules, I see this:
$ lsmod Module Size Used by capability 3464 0 commoncap 5120 1 capability acpi_cpufreq 4748 0 speedstep_lib 3716 0 cpufreq_userspace 3092 0 cpufreq_stats 3588 0 freq_table 3588 2 acpi_cpufreq,cpufreq_stats cpufreq_powersave 1664 0 cpufreq_ondemand 4716 0 cpufreq_conservative 5280 0 b2c2_flexcop_pci 6936 0 b2c2_flexcop 22412 1 b2c2_flexcop_pci mt352 5636 1 b2c2_flexcop mt312 6660 1 b2c2_flexcop bcm3510 8196 1 b2c2_flexcop stv0299 8840 1 b2c2_flexcop stv0297 6272 1 b2c2_flexcop nxt200x 11396 1 b2c2_flexcop lgdt330x 7196 1 b2c2_flexcop psmouse 31624 0
# modprobe p4_clockmod FATAL: Error inserting p4_clockmod (/lib/modules/2.6.18-rc3/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod.ko): Device or resource busy
dmesg is silent on why this is. I've grepped the files in the cpufreq directory, but none of them contain EBUSY.
Under 2.6.16.9, this was logged at startup:
[17179582.044000] p4-clockmod: P4/Xeon(TM) CPU On-Demand Clock Modulation
available
cpuinfo:
$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Pentium(R) 4 CPU 3.00GHz stepping : 1 cpu MHz : 3000.298 cache size : 1024 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 5 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 nx constant_tsc pni monitor ds_cpl cid xtpr bogomips : 6004.95
Quoted 1 line
From .config:
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_TABLE=m
# CONFIG_CPU_FREQ_DEBUG is not set CONFIG_CPU_FREQ_STAT=m
# CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=m CONFIG_CPU_FREQ_GOV_USERSPACE=m CONFIG_CPU_FREQ_GOV_ONDEMAND=m CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
#
# CPUFreq processor drivers
#CONFIG_X86_ACPI_CPUFREQ=mCONFIG_X86_POWERNOW_K6=mCONFIG_X86_POWERNOW_K7=mCONFIG_X86_POWERNOW_K7_ACPI=yCONFIG_X86_POWERNOW_K8=mCONFIG_X86_POWERNOW_K8_ACPI=yCONFIG_X86_GX_SUSPMOD=mCONFIG_X86_SPEEDSTEP_CENTRINO=mCONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=yCONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=yCONFIG_X86_SPEEDSTEP_ICH=mCONFIG_X86_SPEEDSTEP_SMI=mCONFIG_X86_P4_CLOCKMOD=mCONFIG_X86_CPUFREQ_NFORCE2=mCONFIG_X86_LONGRUN=m
dmesg output is on http://ds9a.nl/tmp/dmesg , full .config on
http://ds9a.nl/config
Please let me know how I can help solve this problem. Zwane, you are welcome to ssh to my system if that helps, let me know.
Kind regards,
bert
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services
Quoted 10 lines · bert hubert
Hi everybody,
Since 2.6.18-rc1, up to and including -rc3, cpufreq has died on me. It worked fine in 2.6.16.9.
# modprobe p4_clockmod FATAL: Error inserting p4_clockmod (/lib/modules/2.6.18-rc3/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod.ko): Device or resource busy
I have similar problem with cpufreq-nforce2 -- http://lkml.org/lkml/2006/7/7/234
I haven't do a git-bisect yet.
Signature · 2 lines
Tomasz Torcz "God, root, what's the difference?" [email protected] "God is more forgiving."
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Quoted 2 lines
I have similar problem with cpufreq-nforce2 -- http://lkml.org/lkml/2006/7/7/234
I haven't do a git-bisect yet.
To recap, cpufreq died for at least two people (Tomasz Torcz and me) between 2.6.17 and 2.6.18-rc1. I've cc'd everybody who touched cpufreq according to the shortlog.
Abundant details are in:
http://lkml.org/lkml/2006/7/30/87
New information is that I've narrowed it down from between 2.6.16.9 and 2.6.18-rc1 to between 2.6.17.7 (which works) and 2.6.18-rc1 (which doesn't).
The problem exists both with cpufreq as modules and staticly, and both with P4 and nforce2.
Please let me know how I can help you solve this problem. I'll try a git bisect but a lot of the cpufreq changes appear to be interrelated, so I'm unsure if it will work.
Thanks!
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Do I understand your logs right and acpi-cpufreq is already loaded and works on your processor? Do you have any info in /sys/devices/system/cpu/cpu0/cpufreq ?
Why do you want to load p4-clockmod over it? It does not save you any power, just limits performance.
Regards,
Alex.
Quoted 23 lines · bert hubert
Quoted 2 lines
I have similar problem with cpufreq-nforce2 -- http://lkml.org/lkml/2006/7/7/234
I haven't do a git-bisect yet.To recap, cpufreq died for at least two people (Tomasz Torcz and me) between 2.6.17 and 2.6.18-rc1. I've cc'd everybody who touched cpufreq according to the shortlog.
Abundant details are in:
http://lkml.org/lkml/2006/7/30/87
New information is that I've narrowed it down from between 2.6.16.9 and 2.6.18-rc1 to between 2.6.17.7 (which works) and 2.6.18-rc1 (which doesn't).
The problem exists both with cpufreq as modules and staticly, and both with P4 and nforce2.
Please let me know how I can help you solve this problem. I'll try a git bisect but a lot of the cpufreq changes appear to be interrelated, so I'm unsure if it will work.
Thanks!
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Quoted 2 lines · Alexey Starikovskiy
Do I understand your logs right and acpi-cpufreq is already loaded and works on your processor?
Yes, I can load it, but I'm unable to figure out what it is supposed to do, or if it is doing anything.
Quoted 1 line
Do you have any info in
/sys/devices/system/cpu/cpu0/cpufreq?
No, not with just acpi-cpufreq loaded. With the help of Zwane, I've discovered that if I unload acpi-cpufreq, I *can* load p4-clockmod, and then the directory you mention appears, and I can configure governors, and life is good. This all on 2.6.18-rc3.
Do I understand correctly that acpi-cpufreq is supposed to offer comparable features?
Perhaps acpi-cpufreq *has* loaded, but did not find the proper hooks, but has now registered itself, thus blocking p4-clockmod? When everything is in-kernel, acpi-cpufreq might register itself first, which would lead to the same thing.
For completeness, lspci. This is a desktop system, but I need some kind of governer for quiet running.
$ lspci 0000:00:00.0 Host bridge: Intel Corporation 915G/P/GV/GL/PL/910GL Processor to I/O Controller (rev 04) 0000:00:01.0 PCI bridge: Intel Corporation 915G/P/GV/GL/PL/910GL PCI Express Root Port (rev 04) 0000:00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04) 0000:00:1b.0 0403: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03) 0000:00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03) 0000:00:1c.1 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2 (rev 03) 0000:00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 (rev 03) 0000:00:1c.3 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 4 (rev 03) 0000:00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03) 0000:00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03) 0000:00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03) 0000:00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03) 0000:00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03) 0000:00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d3) 0000:00:1f.0 ISA bridge: Intel Corporation 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03) 0000:00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03) 0000:00:1f.2 IDE interface: Intel Corporation 82801FB/FW (ICH6/ICH6W) SATA Controller (rev 03)0000:00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03) 0000:06:00.0 Network controller: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card (rev 02) 0000:06:08.0 Ethernet controller: Intel Corporation 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller (rev 01)
Thanks!
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Quoted 6 lines · bert hubert
Quoted 1 line
Do you have any info in
/sys/devices/system/cpu/cpu0/cpufreq?No, not with just acpi-cpufreq loaded. With the help of Zwane, I've discovered that if I unload acpi-cpufreq, I *can* load p4-clockmod, and then the directory you mention appears, and I can configure governors, and life is good. This all on 2.6.18-rc3.
Right, cpufreq drivers aren't 'stackable'.
Quoted 2 lines
Do I understand correctly that acpi-cpufreq is supposed to offer comparable features?
If the BIOS supports the relevant ACPI tables.
Quoted 4 lines
Perhaps acpi-cpufreq *has* loaded, but did not find the proper hooks, but has now registered itself, thus blocking p4-clockmod? When everything is in-kernel, acpi-cpufreq might register itself first, which would lead to the same thing.
Normally, if the necessary BIOS bits aren't there, then acpi-cpufreq will fail to register. For some reason it sounds like it believes that everything went ok. I wonder if something changed in acpi recently that caused this change in behaviour ? Len ?
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Quoted 4 lines · Dave Jones
Normally, if the necessary BIOS bits aren't there, then acpi-cpufreq will fail to register. For some reason it sounds like it believes that everything went ok. I wonder if something changed in acpi recently that caused this change in behaviour ? Len ?
As far as I can see, acpi_cpufreq does not pass on any errors it sees during init:
static int __init acpi_cpufreq_init (void)
{
int result = 0;
dprintk("acpi_cpufreq_init\n");
result = acpi_cpufreq_early_init_acpi();...
And from acpi_cpufreq_early_init_acpi():
static int acpi_cpufreq_early_init_acpi(void)
{
struct acpi_processor_performance *data;
unsigned int i, j;
dprintk("acpi_cpufreq_early_init\n");
( some memory allocations, does not look at acpi or bios )
/* Do initialization in ACPI core */
acpi_processor_preregister_performance(acpi_perf_data);
return 0;
}Note how any error from acpi_processor_preregister_performance is ignored.
Ghetto patch which "fixes" the problem for me:
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2006-07-30 21:11:34.000000000 +0200 renamed from arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c~orig 2006-07-30 21:14:43.000000000 +0200 +1 -2
@@ -384,8 +384,7 @@ } /* Do initialization in ACPI core */ - acpi_processor_preregister_performance(acpi_perf_data); - return 0; + return acpi_processor_preregister_performance(acpi_perf_data); }
But tonight I have no speedstep laptop available to check if this does not kill acpi_cpufreq when it can work.
Thanks for the hint, dave!
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
In reply to Dave JonesQuoted 2 lines
went ok. I wonder if something changed in acpi recently that caused this change in behaviour ? Len ?
Dave,
I'm no expert but I think it was you that made this change in
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;h=567b39bea07e4fbbe091b265b010905e3d30ff5a;hp=1a7bdcef19261deff5a7ea8ee13d5a8ddb434a19;hb=911cb74bb9e77e40749abc2fca6fe74d87d940f3;f=arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+ /* Do initialization in ACPI core */
+ acpi_processor_preregister_performance(acpi_perf_data);
+ return 0;
+}
:-)
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Quoted 8 lines · bert hubert
Quoted 2 lines
went ok. I wonder if something changed in acpi recently that caused this change in behaviour ? Len ?
Dave,
I'm no expert but I think it was you that made this change in
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;h=567b39bea07e4fbbe091b265b010905e3d30ff5a;hp=1a7bdcef19261deff5a7ea8ee13d5a8ddb434a19;hb=911cb74bb9e77e40749abc2fca6fe74d87d940f3;f=arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
Quoted 6 lines
+ /* Do initialization in ACPI core */
+acpi_processor_preregister_performance(acpi_perf_data);
+ return 0;
+}:-)
I'm puzzled. As that commit message doesn't match the diff. If you click "commitdiff", you'll see the actual commit for that msg, which is a one-liner.
Your change in your previous mail makes sense to me though, so I'll commit it to cpufreq.git later today.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Quoted 2 lines · Dave Jones
Your change in your previous mail makes sense to me though, so I'll commit it to cpufreq.git later today.
Do you think this will make 2.6.18? Otherwise any kernel with acpi_list compiled in will have no frequency scaling, unless it supports scaling over ACPI.
Thanks!
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services
Re: 2.6.17 -> 2.6.18 regression: cpufreq broken since 2.6.18-rc1 on pentium4
Quoted 8 lines · bert hubert
Quoted 2 lines · Dave Jones
Your change in your previous mail makes sense to me though, so I'll commit it to cpufreq.git later today.
Do you think this will make 2.6.18? Otherwise any kernel with
acpi_listcompiled in will have no frequency scaling, unless it supports scaling over ACPI.
Yes, I'll queue it for .18
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 6 lines · Tomasz Torcz
Quoted 5 lines · bert hubert
Hi everybody,
Since 2.6.18-rc1, up to and including -rc3, cpufreq has died on me. It worked fine in 2.6.16.9.
Quoted 8 lines
Quoted 5 lines
# modprobe p4_clockmod FATAL: Error inserting p4_clockmod (/lib/modules/2.6.18-rc3/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod.ko): Device or resource busyI have similar problem with cpufreq-nforce2 -- http://lkml.org/lkml/2006/7/7/234
I haven't do a git-bisect yet.
Could you fellows try it without;
CONFIG_X86_SPEEDSTEP_CENTRINOCONFIG_X86_SPEEDSTEP_CENTRINO_ACPICONFIG_X86_SPEEDSTEP_CENTRINO_TABLECONFIG_X86_SPEEDSTEP_ICHCONFIG_X86_SPEEDSTEP_SMICONFIG_X86_ACPI_CPUFREQ
It may likely be a driver registration thing.
Thanks,
Zwane
Quoted 17 lines · Zwane Mwaikambo
Quoted 6 lines · Tomasz Torcz
Quoted 5 lines · bert hubert
Hi everybody,
Since 2.6.18-rc1, up to and including -rc3, cpufreq has died on me. It worked fine in 2.6.16.9.
Quoted 8 lines
Quoted 5 lines
# modprobe p4_clockmod FATAL: Error inserting p4_clockmod (/lib/modules/2.6.18-rc3/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod.ko): Device or resource busyI have similar problem with cpufreq-nforce2 -- http://lkml.org/lkml/2006/7/7/234
I haven't do a git-bisect yet.
Quoted 7 lines
Could you fellows try it without;
CONFIG_X86_SPEEDSTEP_CENTRINOCONFIG_X86_SPEEDSTEP_CENTRINO_ACPICONFIG_X86_SPEEDSTEP_CENTRINO_TABLECONFIG_X86_SPEEDSTEP_ICHCONFIG_X86_SPEEDSTEP_SMI
I had those =n
Quoted 1 line
CONFIG_X86_ACPI_CPUFREQ
I had this one =y. After setting =n, cpufreq-nforce2 (=m) works again.
powernowd: PowerNow Daemon v0.96, (c) 2003-2005 John Clemens
powernowd: Found 1 cpu: -- 1 thread (or core) per physical cpu /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory
powernowd: cpu0: 1228Mhz - 1753Mhz (7 steps)
Signature · 2 lines
Tomasz Torcz "Never underestimate the bandwidth of a station [email protected] wagon filled with backup tapes." -- Jim Gray
Quoted 11 lines · Tomasz Torcz
Quoted 1 line · Zwane Mwaikambo
CONFIG_X86_ACPI_CPUFREQI had this one =y. After setting =n, cpufreq-nforce2 (=m) works again.
powernowd: PowerNow Daemon v0.96, (c) 2003-2005 John Clemens
powernowd: Found 1 cpu: -- 1 thread (or core) per physical cpu/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory
powernowd: cpu0: 1228Mhz - 1753Mhz (7 steps)
Hi Tomasz,
Could you also please test Bert's patch which propogates error
return values with your previous configuration?
Thanks,
Zwane
Quoted 14 lines · Zwane Mwaikambo
Quoted 11 lines · Tomasz Torcz
Quoted 1 line · Zwane Mwaikambo
CONFIG_X86_ACPI_CPUFREQI had this one =y. After setting =n, cpufreq-nforce2 (=m) works again.
powernowd: PowerNow Daemon v0.96, (c) 2003-2005 John Clemens
powernowd: Found 1 cpu: -- 1 thread (or core) per physical cpu/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: No such file or directory
powernowd: cpu0: 1228Mhz - 1753Mhz (7 steps)
Quoted 4 lines
Hi Tomasz,
Could you also please test Bert's patch which propogates error
return values with your previous configuration?
Bert's patch works. With CONFIG_X86_ACPI_CPUFREQ=y and
cpufre-nforce2=m I have working cpufreq (like in 2.6.17 and before).
Signature · 2 lines
Tomasz Torcz "Never underestimate the bandwidth of a station [email protected] wagon filled with backup tapes." -- Jim Gray
Quoted 11 lines · Tomasz Torcz
Quoted 10 lines · bert hubert
Hi everybody,
Since 2.6.18-rc1, up to and including -rc3, cpufreq has died on me. It worked fine in 2.6.16.9.
# modprobe p4_clockmod FATAL: Error inserting p4_clockmod (/lib/modules/2.6.18-rc3/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod.ko): Device or resource busy
as a side note ... you realize that clockmod doesn't actually save you any power right? ;)
Quoted 2 lines · Arjan van de Ven
as a side note ... you realize that clockmod doesn't actually save you any power right? ;)
Indeed, and I've measured that too. But it saves an awful amount of noise!
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services
Quoted 6 lines · bert hubert
Quoted 2 lines · Arjan van de Ven
as a side note ... you realize that clockmod doesn't actually save you any power right? ;)
Indeed, and I've measured that too. But it saves an awful amount of noise!
If it doesn't save you power, how does it reduce noise? I guess it keeps you from overheating your processor which causes the fan to spin up?
-Dave
Quoted 5 lines · David Rees
Quoted 1 line
Indeed, and I've measured that too. But it saves an awful amount of noise!
If it doesn't save you power, how does it reduce noise? I guess it keeps you from overheating your processor which causes the fan to spin up?
I have no idea. Perhaps heat production moves somewhere else. But you are free to come listen to the difference p4-clockmod makes for me.
Thanks.
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://netherlabs.nl Open and Closed source services