Bug 11416 - HP Compaq 6715s (and similar) horrible slow HD performance, max cstate must be 1
Summary: HP Compaq 6715s (and similar) horrible slow HD performance, max cstate must be 1
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Processor (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Venkatesh Pallipadi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-24 07:56 UTC by Matthias Tingelhoff
Modified: 2009-02-09 17:17 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.24.x - 2.6.27rc4
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
working fix (599 bytes, patch)
2008-08-24 07:57 UTC, Matthias Tingelhoff
Details | Diff
dump created with acpidump (332.72 KB, application/octet-stream)
2008-09-03 13:43 UTC, Matthias Tingelhoff
Details
dump of /proc/cpuinfo (719 bytes, text/plain)
2008-12-02 09:21 UTC, Matthias Tingelhoff
Details

Description Matthias Tingelhoff 2008-08-24 07:56:29 UTC
The problem is described here:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/134856

Figured out that an entry in the set_max_cstate table in acpi/processor_idle.c fixes that problem.
Comment 1 Matthias Tingelhoff 2008-08-24 07:57:51 UTC
Created attachment 17415 [details]
working fix
Comment 2 ykzhao 2008-09-01 19:18:45 UTC
Hi, Matthias
   Will you please try the boot option of "processor.max_cstate=2" and see whether the problem still exists? 
    Please don't apply the patch in comment #1 and the processor (in the directory drivers/acpi/) should be compiled as built-in modules.
   Thanks.
Comment 3 Matthias Tingelhoff 2008-09-02 06:09:44 UTC
Hello Yakui, I've tried that max_cstate=2 thing and first I thought "oh cool this is working too" because the slow-HD problem disappeared, but my system was unusual unstable (randomly freezes after minutes or hours) so actually its not a preferable solution.
Similar freezes occur when running Linux without a max_cstate "limitation" and without "noapic" kernel-parameter, there the freezes occurs more frequently including the display turns black (AFAIK this is or was a known problem on many HP Laptops)... with max_cstate=1 none of these things happen even with apic enabled.

I hope i could help
greets, Matze
Comment 4 ykzhao 2008-09-02 17:47:59 UTC
Hi, Matthias
    Maybe the system can work well only in case of "processor.max_cstate=1".
    Will you please attach the output of acpidump?
    Thanks.
Comment 5 Matthias Tingelhoff 2008-09-03 13:43:40 UTC
Created attachment 17601 [details]
dump created with acpidump

Here it is :)
Comment 6 ykzhao 2008-09-07 23:24:33 UTC
From the log in https://bugs.launchpad.net/ubuntu/+source/linux/+bug/134856
it seems that the issue can be fixed by adding the boot option of "nohz=off" or disabling tickless feature.

Will you please try the boot option of 'nolapic_timer" and see whether the problem still exists?

Thanks.
Comment 7 Matthias Tingelhoff 2008-09-23 09:09:41 UTC
(c/p from my launchpad post to keep this up)

Greetings,
adding the "nolapic_timer" parameter leads to system freeze/blank screen during boot before getting to init :-(
Comment 8 Zhang Rui 2008-11-16 23:25:38 UTC
hmmm, what if update your kernel to the latest kernel release, say 2.6.27?
Comment 9 Matthias Tingelhoff 2008-11-17 08:56:55 UTC
currently using 2.6.27.5 but still need the patch.
nohz=off is still an alternative but IMHO the less preferable workaroud
Comment 10 Zhang Rui 2008-11-17 17:24:56 UTC
well, workaround is available, but we have no idea how to debug this problem.

len and Venki,
should we merge the patch in comment #1 or keep on searching for the root cause?

re-assign to Venki.
Comment 11 Zhang Rui 2008-11-26 18:17:31 UTC
Matthias,
can you try powertop on this laptop?
and see if there are a signaficant number of wakeup events.
Comment 12 Venkatesh Pallipadi 2008-12-01 16:24:18 UTC
Copying amd folks.
Are C2 and C3 states supposed to work on this CPU? 

Thanks.
Comment 13 Matthias Tingelhoff 2008-12-02 06:47:53 UTC
Here are my investigations with powertop:

kernel 2.6.27.7, limited to C1 state:
If I dont move anything, the most wakeup events come from the b43 w-lan driver which IMO seems normal.
Type something on the keyboard or move mouse/touchpad causes many wakeups.. I guess this is normal too.

with parameters "processor.max_cstate=9 nohz=off" :
Powertop shows that C2 and C3 states are "available" but never uses them... I dont know when these states should be running but I also tried to run the Laptop from battery and turning of the ondemand gouvaneur and forced the CPU to run with 2GHZ (maximum).... only C1 state is used but again I dont know enough about these stuff so I could be totally wrong.

with "processor.max_cstate=9" only:
system boots slow, and freezes during init ... no chance to do investigations there.

MAYBE the nohz feature forces the CPU to enter C2/C3 states, which cause the system to fail ? But strange that it reports that these states are available...

thats all I could say now, I hope that helps in some way
greetz, Matze
Comment 14 Mark Langsdorf 2008-12-02 08:11:10 UTC
I can't tell if it's a Turion X2 or a Sempron.  Could you dump /proc/cpuinfo, please?
Comment 15 Matthias Tingelhoff 2008-12-02 09:21:08 UTC
Created attachment 19102 [details]
dump of /proc/cpuinfo
Comment 16 Mark Langsdorf 2008-12-02 10:01:51 UTC
Thank you.

The revision guide clearly shows it to be a Mobile Semprom, and the BIOS guide
indicates those should support C2/C3 and *not* C1e.

It's possible that the BIOS isn't setting up the Cx SMAF codes correctly, but
that seems unlikely.  There is an erratum dealing with C3, but a) it causes a
hang, not a slowdown b) there's a BIOS work-around.  So as long as the BIOS is
up-to-date, I am not sure what is happening here.
Comment 17 Matthias Tingelhoff 2008-12-02 10:19:06 UTC
You're welcome, AMD-Guy :)

With "hang" do you mean a short slowdown thats not even noticeable, or a hang "forever" ? Because this is actually happening when Linux is running with max_cstate=9 and nohz enabled ... BIOS is also up-to-date but I saw some people with HP Laptops who had similar problems running Linux... so maybe its HP's BIOSes for some machines who are fcked-up.

If there is any more information/dumps/whatever I could supply to identify the problem, just let me know. Im not experienced enough to track the problem by myself but I find it stange that the C2/C3 states didnt cause problems with nohz disabled ...
Comment 18 Fabio Pedretti 2009-02-03 06:04:04 UTC
Apparently, this is now fixed in 2.6.28:

$ sudo hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads: 902 MB in 2.00 seconds = 450.42 MB/sec
 Timing buffered disk reads: 126 MB in 3.00 seconds = 41.98 MB/sec
Comment 19 ykzhao 2009-02-04 19:30:11 UTC
HI, Fabio
    Good news. It seems that this is already fixed.
    
Hi, Venki
    How about close this bug?
    
    Thanks.
Comment 20 Zhang Rui 2009-02-09 17:17:53 UTC
close this bug as it's fixed in 2.6.28.

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