Bug 6382 - powernow_k8 causes hangs on system
Summary: powernow_k8 causes hangs on system
Status: CLOSED UNREPRODUCIBLE
Alias: None
Product: Power Management
Classification: Unclassified
Component: cpufreq (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Mark Langsdorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-13 00:39 UTC by Andriy Stepanov
Modified: 2010-12-14 04:03 UTC (History)
7 users (show)

See Also:
Kernel Version: 2.6.24
Subsystem:
Regression: No
Bisected commit-id:


Attachments
/proc/cpuinfo (476 bytes, text/plain)
2006-04-13 03:30 UTC, Andriy Stepanov
Details
/proc/iomem (1.22 KB, text/plain)
2006-04-13 03:31 UTC, Andriy Stepanov
Details
/proc/ioports (908 bytes, text/plain)
2006-04-13 03:32 UTC, Andriy Stepanov
Details
lspci (13.18 KB, text/plain)
2006-04-13 03:32 UTC, Andriy Stepanov
Details
/proc/modules (1.70 KB, text/plain)
2006-04-13 03:33 UTC, Andriy Stepanov
Details
/proc/scsi/scsi (334 bytes, text/plain)
2006-04-13 03:33 UTC, Andriy Stepanov
Details
dmesg (15.12 KB, text/plain)
2006-04-13 05:09 UTC, Andriy Stepanov
Details
CPU freq configuration details (1.14 KB, text/plain)
2006-04-13 06:33 UTC, Andriy Stepanov
Details

Description Andriy Stepanov 2006-04-13 00:39:45 UTC
Most recent kernel where this bug did not occur:
Distribution: ALT Linux
Hardware Environment: Notebook Clevo N55J, nVidia MCP51

Steps to reproduce:
Random lockups in console mode without X (init 3). No OPS message.
Comment 1 Andriy Stepanov 2006-04-13 03:30:51 UTC
Created attachment 7853 [details]
/proc/cpuinfo
Comment 2 Andriy Stepanov 2006-04-13 03:31:30 UTC
Created attachment 7854 [details]
/proc/iomem
Comment 3 Andriy Stepanov 2006-04-13 03:32:00 UTC
Created attachment 7855 [details]
/proc/ioports
Comment 4 Andriy Stepanov 2006-04-13 03:32:31 UTC
Created attachment 7856 [details]
lspci
Comment 5 Andriy Stepanov 2006-04-13 03:33:16 UTC
Created attachment 7857 [details]
/proc/modules
Comment 6 Andriy Stepanov 2006-04-13 03:33:47 UTC
Created attachment 7858 [details]
/proc/scsi/scsi
Comment 7 Andriy Stepanov 2006-04-13 04:51:31 UTC
Additional notes:
Computer works fine if module powernow-k8 is not loaded.
# modprobe -r powernow-k8
Without this module, notebook works fine and no more any lockups.
Comment 8 Andriy Stepanov 2006-04-13 05:05:15 UTC
System freeze with powersaved running.
Comment 9 Andriy Stepanov 2006-04-13 05:09:39 UTC
Created attachment 7859 [details]
dmesg
Comment 10 Stefan Seyfried 2006-04-13 06:14:28 UTC
what cpufreq governor are you using? Depending on the powersave configuration 
it might be userspace or ondemand.
See /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.
also, a "grep -r . /sys/devices/system/cpu/" will give a quick overview of the 
used configuration.
Comment 11 Andriy Stepanov 2006-04-13 06:33:11 UTC
Created attachment 7860 [details]
CPU freq configuration details
Comment 12 Andriy Stepanov 2006-04-17 05:52:09 UTC
First of all: This bug does not depend from sata_nv (computer lockups without
any ATA driver)

Steps to reproduce lockups:
1. (optional) boot to init level 1
2. modprobe cpufreq_userspace
   modprobe powernow_k8
3. cd /sys/devices/system/cpu/cpu0/cpufreq
3. echo userspace > scaling_governor
4. while true; do echo 800000 > scaling_setspeed; sleep 4; echo 1800000 >
scaling_setspeed; sleep 4; done

Notebook will be hang in any way after few changes of frequency.

Bug is at:
powernow-k8.c -> 
Phase 3 (function core_voltage_post_transition) ->
function write_new_vid ->
wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS);

Switching from 800000 kHz to 1800000 kHz all time goes fine!
But in same cases switching from 1800000 kHz to 800000 kHz bring to compleate hang.

Also I mentioned strange behaviour:
If put printk("..."); right after wrmsr() no more lockups. (say: dmesg -n 9 on
console).

And last:
If define STOP_GRANT_5NS as 50000 (10 msec on 500 MHz bus) computer will be
locked at first switching from 1800000 kHz to 800000 kHz.
Comment 13 Ivan Zaera Avellon 2007-07-25 03:45:55 UTC
Hi both:

I think I have the same problem on an AMD 64 with Debian Testing, kernel 2.6.21-2-amd64 #1 SMP. It is a desktop PC. I'm just adding myself to the CC list of this bug to get notifications of what's going on. If I can be of any help, please let me know.

I'm now testing "modprobe -r powernow_k8" and it's been working for two hours without hang. Before it hung in less than an hour (about 10 times since yesterday).

You can also find more people with similar problems here:

https://bugs.launchpad.net/tuxlab/+source/linux-source-2.6.17/+bug/85370
Comment 14 Natalie Protasevich 2008-03-20 01:08:38 UTC
Has anyone tried recent kernel? the power management has been greatly improved, the bug might has been fixed.
Comment 15 Ivan Zaera Avellon 2008-04-22 00:51:15 UTC
Hi Natalie:

I have tried with kernel 2.6.24 and it still hangs. I think this bug is related (if not the same) to 8547 and 8264.

I propose to follow this problem in bug 8264 to centralize all comments (mark 8547 and 6382 as duplicats of 8264) 

What do you think? Can anyone confirm if those three are the same bug?

Thanks.
Ivan
Comment 16 Márton Németh 2008-08-20 00:32:00 UTC
I just add here some links for 
 - bug #8264 (powernow-k8 module gets stuck switching powerlevels on dualcore
AMD64) and
 - bug #8547 ("Hardware error - pending bit very stuck" on Mobile AMD Sempron)
for easier reference.
Comment 17 Len Brown 2010-12-14 04:02:45 UTC
no update in 2 years
please re-open if this is still a problem with current linux.

Note You need to log in before you can comment on or make changes to this bug.