C-state C3 missing?

Frans Pop elendil at planet.nl
Fri May 18 07:32:52 PDT 2007


Hi,

Thanks for this great utility. Hopefully it will help the drive for power 
efficiency.

I've tried powertop 1.0 both with my current 2.6.18 kernel (Debian Etch) 
and with 2.6.22-rc1 with CONFIG_TIMER_STATS enabled to see the details.

There is something weird with powertop and how many C states it shows.

The first time I ran it on a 2.6.18 kernel, I remembered seeing 4 C states 
(C0 to C3). But later, when I tried it under 2.6.22-rc1, it only showed 
C0, C1 and C2. I tried a number of times to see if I would get C3 back, 
but no luck.

Now today powertop suddenly does show C3 again (using 1.1 on 2.6.18):
Cn          Avg residency (5s)  Long term residency avg
C0 (cpu running)        ( 6.4%)
C1                0.0ms ( 0.0%)                   0.0ms
C2                3.0ms (93.6%)                   2.9ms
C3                0.0ms ( 0.0%)                   0.0ms

The duration for C2 matches what powertop gives: most all time is spent in 
C2, none in C1. Processor is Mobile Intel(R) Pentium(R) 4 (2.80GHz).
Most testing was done while connected to mains so mains/battery is not an 
issue here.

It looks like maybe powertop only shows states that have a usage/duration 
greater than zero. This is what I had when powertop did not show C3:

$ cat /proc/acpi/processor/CPU0/power
active state:            C2
max_cstate:              C8
bus master activity:     f007ffff
states:
    C1:                  type[C1] promotion[C2] demotion[--] latency[000] 
usage[00000010] duration[00000000000000000000]
   *C2:                  type[C2] promotion[C3] demotion[C1] latency[001] 
usage[00254084] duration[00000000001696262530]
    C3:                  type[C3] promotion[--] demotion[C2] latency[085] 
usage[00000000] duration[00000000000000000000]

Now, when it does show C3, I have:
$ cat /proc/acpi/processor/CPU0/power
active state:            C2
max_cstate:              C8
bus master activity:     ffffffff
states:
    C1:                  type[C1] promotion[C2] demotion[--] latency[000] 
usage[00000010] duration[00000000000000000000]
   *C2:                  type[C2] promotion[C3] demotion[C1] latency[001] 
usage[08499497] duration[00000000085733891845]
    C3:                  type[C3] promotion[--] demotion[C2] latency[085] 
usage[00000228] duration[00000000000001637839]

If that is indeed the cause, it seems like a bug to me. IMO powertop 
should always display all available C states, whether they get activated 
or not. How else are you supposed to know that there is major room for 
improvement? :-)

Cheers,
FJP
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.bughost.org/pipermail/power/attachments/20070518/34c131fe/attachment.bin


More information about the Power mailing list