Skip to contentSkip to conversation

BIOS and CPU C_states are strange

DISCUSSION Mahmood Naderan 4 participants 11 messages Jun 19, 2009 – Jun 23, 2009 7 messages not in the archive ACPI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi,

Quoted 2 lines

Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

You mean that powertop is not correctly reading the states? Do you mean that the BIOS reports better that the CPU ?

--------------------------
*Mahmood Naderan*

Quoted 52 lines · Edward Shao

Hi Mahmood,

So far as I know, if your CPU is Intel, powertop maybe cause a misleading. Powertop uses CPUID.5.EDX to check CPU supported C states. According Intel's spec (Intel Processor Identification and the CPUID Instruction (Application Note 485), a CPU only has

C0, C1, C2, C3, C4 (prior Core i7)
C0, C1, C2, C6, C7 (Core i7 and subsequent)

Check with source code of powertop
while (edx) {
               if (edx&7)
                       printf("C%i ", i);
               edx = edx >> 4;
               i++;
       }
Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

Ps: I does not check AMD's spec.

Best Regards,
Edward

Quoted 12 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Quoted 9 lines

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 3 lines

--
Best Regards,
Edward

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Hi,
1- where can I find powertop source code?
2- what is the name of intel utility in windows as you said?
--------------------------
*Mahmood Naderan*

Quoted 95 lines · Edward Shao

Hi~
It's all depended on how utility to interpret raw information (both information reported by CPU or BIOS).
You can check source code of powertop for detail information. For BIOS part, powertop checks value of mwait hint register reported by ACPI _CST method.

As my experience, powertop will cause a misleading sometimes, especially for new Intel CPU.
For example:
BIOS engineer said they followed Intel BIOS porting guide to report an accuracy C-state (C6) information via ACPI _CST method. However powertop said BIOS only reports C3. (but Intel utility under Windows said CPU can enter C6).

Best Regards,
Edward

Quoted 65 lines · Mahmood Naderan

Hi,

Quoted 2 lines

Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

You mean that powertop is not correctly reading the states? Do you mean that the BIOS reports better that the CPU ?

--------------------------
*Mahmood Naderan*

Quoted 52 lines · Edward Shao

Hi Mahmood,

So far as I know, if your CPU is Intel, powertop maybe cause a misleading. Powertop uses CPUID.5.EDX to check CPU supported C states. According Intel's spec (Intel Processor Identification and the CPUID Instruction (Application Note 485), a CPU only has

C0, C1, C2, C3, C4 (prior Core i7)
C0, C1, C2, C6, C7 (Core i7 and subsequent)

Check with source code of powertop
while (edx) {
               if (edx&7)
                       printf("C%i ", i);
               edx = edx >> 4;
               i++;
       }
Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

Ps: I does not check AMD's spec.

Best Regards,
Edward

Quoted 21 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 8 lines
Quoted 3 lines

--
Best Regards,
Edward

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

--
Best Regards,
Edward

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw

Hi~
powertop can download from
http://www.lesswatts.org/projects/powertop/download/powertop-1.11.tar.gz

Sorry~I forgot the name of Intel utility.

Best Regards,
Edward

Quoted 114 lines · Mahmood Naderan

Hi,
1- where can I find powertop source code?
2- what is the name of intel utility in windows as you said?
--------------------------
*Mahmood Naderan*

Quoted 95 lines · Edward Shao

Hi~
It's all depended on how utility to interpret raw information (both information reported by CPU or BIOS).
You can check source code of powertop for detail information. For BIOS part, powertop checks value of mwait hint register reported by ACPI _CST method.

As my experience, powertop will cause a misleading sometimes, especially for new Intel CPU.
For example:
BIOS engineer said they followed Intel BIOS porting guide to report an accuracy C-state (C6) information via ACPI _CST method. However powertop said BIOS only reports C3. (but Intel utility under Windows said CPU can enter C6).

Best Regards,
Edward

Quoted 65 lines · Mahmood Naderan

Hi,

Quoted 2 lines

Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

You mean that powertop is not correctly reading the states? Do you mean that the BIOS reports better that the CPU ?

--------------------------
*Mahmood Naderan*

Quoted 52 lines · Edward Shao

Hi Mahmood,

So far as I know, if your CPU is Intel, powertop maybe cause a misleading. Powertop uses CPUID.5.EDX to check CPU supported C states. According Intel's spec (Intel Processor Identification and the CPUID Instruction (Application Note 485), a CPU only has

C0, C1, C2, C3, C4 (prior Core i7)
C0, C1, C2, C6, C7 (Core i7 and subsequent)

Check with source code of powertop
while (edx) {
               if (edx&7)
                       printf("C%i ", i);
               edx = edx >> 4;
               i++;
       }
Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

Ps: I does not check AMD's spec.

Best Regards,
Edward

Quoted 21 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 8 lines
Quoted 3 lines

--
Best Regards,
Edward

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

--
Best Regards,
Edward

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 6 lines
Best Regards,
Edward
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

Hi,
Thanks. Can I expect future versions of powertop will consider my problem or it is a specific bug related to my BIOS (my laptop is HP Pavilion DV2000)? I mean, this misreading is a bug in powertop or not?

--------------------------
*Mahmood Naderan*

Quoted 127 lines · Edward Shao

Hi~
powertop can download from
http://www.lesswatts.org/projects/powertop/download/powertop-1.11.tar.gz

Sorry~I forgot the name of Intel utility.

Best Regards,
Edward

Quoted 105 lines · Mahmood Naderan

Hi,
1- where can I find powertop source code?
2- what is the name of intel utility in windows as you said?
--------------------------
*Mahmood Naderan*

Quoted 95 lines · Edward Shao

Hi~
It's all depended on how utility to interpret raw information (both information reported by CPU or BIOS).
You can check source code of powertop for detail information. For BIOS part, powertop checks value of mwait hint register reported by ACPI _CST method.

As my experience, powertop will cause a misleading sometimes, especially for new Intel CPU.
For example:
BIOS engineer said they followed Intel BIOS porting guide to report an accuracy C-state (C6) information via ACPI _CST method. However powertop said BIOS only reports C3. (but Intel utility under Windows said CPU can enter C6).

Best Regards,
Edward

Quoted 73 lines · Mahmood Naderan

Hi,

Quoted 2 lines

Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

You mean that powertop is not correctly reading the states? Do you mean that the BIOS reports better that the CPU ?

--------------------------
*Mahmood Naderan*

Quoted 52 lines · Edward Shao

Hi Mahmood,

So far as I know, if your CPU is Intel, powertop maybe cause a misleading. Powertop uses CPUID.5.EDX to check CPU supported C states. According Intel's spec (Intel Processor Identification and the CPUID Instruction (Application Note 485), a CPU only has

C0, C1, C2, C3, C4 (prior Core i7)
C0, C1, C2, C6, C7 (Core i7 and subsequent)

Check with source code of powertop
while (edx) {
               if (edx&7)
                       printf("C%i ", i);
               edx = edx >> 4;
               i++;
       }
Only simple check value of edx.
Well, unless CPU uses CPUID.5.EDX[31:20], the reserved area.

Ps: I does not check AMD's spec.

Best Regards,
Edward

Quoted 12 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Quoted 9 lines

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 3 lines

--
Best Regards,
Edward

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 9 lines
Quoted 4 lines

--
Best Regards,
Edward

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 8 lines

--
Best Regards,
Edward
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

I got more confused... In my first post if you see, BIOS reports C1, C2 and C6. Even it does not support C3 (!),  but here is the output of "cat /proc/acpi/processor/CPU0/power":

active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000000000 usec
states:
   C1:                  type[C1] promotion[--] demotion[--] latency[001] usage[00000063] duration[00000000000000000000]
   C2:                  type[C2] promotion[--] demotion[--] latency[001] usage[00017466] duration[00000000000014422985]
   C3:                  type[C3] promotion[--] demotion[--] latency[162] usage[00096196] duration[00000000000650582389]

So I think something (BIOS or CPU or OS) is malfunctioning and does not report correctly.
Now the big question is, will my system (a combination of CPU, BIOS and OS) enter C3 (or even deeper states)?

--------------------------
*Mahmood Naderan*

Quoted 7 lines · Ananth Narayan S

You could see it that way. The OS will use the C states exported by the BIOS. If C4/C5 are not exported, the OS will not even know that such states exist. If you query /proc/acpi/CPU*/power, you'll probably see just three C states listed (C1, C2, C3). Typically the last C-state (C3) in that will map to the lowest C-state supported by the processor.

Quoted 52 lines

-- Ananth

Quoted 45 lines · Mahmood Naderan

Hi,
So if my understanding is correct, the BIOS does not allow the CPU to enter C4 and C5 states. Right?

--------------------------
*Mahmood Naderan*

Quoted 32 lines · Ananth Narayan S

Intel processors export a max supported c state value. But when it comes to c states, typically the one that provides max power savings is exported by the BIOS. The intermediate ones aren't.

-- Ananth Narayan S.

Quoted 21 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#13 lore raw

Hi~
In your case, typically C3 should map to CPU C6.

Best Regards,
Edward

Quoted 93 lines · Mahmood Naderan

I got more confused... In my first post if you see, BIOS reports C1, C2 and C6. Even it does not support C3 (!),  but here is the output of "cat /proc/acpi/processor/CPU0/power":

active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000000000 usec
states:
   C1:                  type[C1] promotion[--] demotion[--] latency[001] usage[00000063] duration[00000000000000000000]
   C2:                  type[C2] promotion[--] demotion[--] latency[001] usage[00017466] duration[00000000000014422985]
   C3:                  type[C3] promotion[--] demotion[--] latency[162] usage[00096196] duration[00000000000650582389]

So I think something (BIOS or CPU or OS) is malfunctioning and does not report correctly.
Now the big question is, will my system (a combination of CPU, BIOS and OS) enter C3 (or even deeper states)?

--------------------------
*Mahmood Naderan*

Quoted 7 lines · Ananth Narayan S

You could see it that way. The OS will use the C states exported by the BIOS. If C4/C5 are not exported, the OS will not even know that such states exist. If you query /proc/acpi/CPU*/power, you'll probably see just three C states listed (C1, C2, C3). Typically the last C-state (C3) in that will map to the lowest C-state supported by the processor.

Quoted 52 lines

-- Ananth

Quoted 45 lines · Mahmood Naderan

Hi,
So if my understanding is correct, the BIOS does not allow the CPU to enter C4 and C5 states. Right?

--------------------------
*Mahmood Naderan*

Quoted 32 lines · Ananth Narayan S

Intel processors export a max supported c state value. But when it comes to c states, typically the one that provides max power savings is exported by the BIOS. The intermediate ones aren't.

-- Ananth Narayan S.

Quoted 21 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 6 lines
Best Regards,
Edward
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#14 lore raw

hi,
Maybe.... as I asked where is the source code of powertop and what is the intel utility that you said in windows? Thanks.

--------------------------
*Mahmood Naderan*

Quoted 103 lines · Edward Shao

Hi~
In your case, typically C3 should map to CPU C6.

Best Regards,
Edward

Quoted 88 lines · Mahmood Naderan

I got more confused... In my first post if you see, BIOS reports C1, C2 and C6. Even it does not support C3 (!),  but here is the output of "cat /proc/acpi/processor/CPU0/power":

active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000000000 usec
states:
   C1:                  type[C1] promotion[--] demotion[--] latency[001] usage[00000063] duration[00000000000000000000]
   C2:                  type[C2] promotion[--] demotion[--] latency[001] usage[00017466] duration[00000000000014422985]
   C3:                  type[C3] promotion[--] demotion[--] latency[162] usage[00096196] duration[00000000000650582389]

So I think something (BIOS or CPU or OS) is malfunctioning and does not report correctly.
Now the big question is, will my system (a combination of CPU, BIOS and OS) enter C3 (or even deeper states)?

--------------------------
*Mahmood Naderan*

Quoted 7 lines · Ananth Narayan S

You could see it that way. The OS will use the C states exported by the BIOS. If C4/C5 are not exported, the OS will not even know that such states exist. If you query /proc/acpi/CPU*/power, you'll probably see just three C states listed (C1, C2, C3). Typically the last C-state (C3) in that will map to the lowest C-state supported by the processor.

Quoted 52 lines

-- Ananth

Quoted 45 lines · Mahmood Naderan

Hi,
So if my understanding is correct, the BIOS does not allow the CPU to enter C4 and C5 states. Right?

--------------------------
*Mahmood Naderan*

Quoted 32 lines · Ananth Narayan S

Intel processors export a max supported c state value. But when it comes to c states, typically the one that provides max power savings is exported by the BIOS. The intermediate ones aren't.

-- Ananth Narayan S.

Quoted 21 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Quoted 8 lines

--
Best Regards,
Edward
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#15 lore raw
In reply to Mahmood Naderan
Quoted 16 lines · Mahmood Naderan

I got more confused... In my first post if you see, BIOS reports C1, C2 and C6. Even it does not support C3 (!), but here is the output of "cat /proc/acpi/processor/CPU0/power":

active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000000000 usec

states:
C1: type[C1] promotion[--] demotion[--]
latency[001] usage[00000063] duration[00000000000000000000]
C2: type[C2] promotion[--] demotion[--]
latency[001] usage[00017466] duration[00000000000014422985]
C3: type[C3] promotion[--] demotion[--]
latency[162] usage[00096196] duration[00000000000650582389]

Quoted 4 lines

So I think something (BIOS or CPU or OS) is malfunctioning and does not report correctly.
Now the big question is, will my system (a combination of CPU, BIOS and OS) enter C3 (or even deeper states)?

What is your problem?

The following info only tells us that the following CPU C-state is supported on the CPU.

Quoted 1 line

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6

But not all the CPU C-state is not used by the OS. It seems that the C1/C2/C6 is used on this box.

At the same time it is noted that the cpu C-state is different with the ACPI C-state. In fact BIOS will do the mapping between the CPU C-state and ACPI C-state. And ACPI C-state is used by the OS.
For example: on your box: The CPU C6 is mapped to ACPI C3-state.

Quoted 1 line

From the info of "cat /proc/acpi/processor/CPU*/power" we know that your

box can enter the ACPI C3, which is mapped to the CPU C6. Of course it is the deep C-state.

Thanks.

Quoted 68 lines

--------------------------
*Mahmood Naderan*

Quoted 7 lines · Ananth Narayan S

You could see it that way. The OS will use the C states exported by the BIOS. If C4/C5 are not exported, the OS will not even know that such states exist. If you query /proc/acpi/CPU*/power, you'll probably see just three C states listed (C1, C2, C3). Typically the last C-state (C3) in that will map to the lowest C-state supported by the processor.

Quoted 52 lines

-- Ananth

Quoted 45 lines · Mahmood Naderan

Hi,
So if my understanding is correct, the BIOS does not allow the CPU to enter C4 and C5 states. Right?

--------------------------
*Mahmood Naderan*

Quoted 32 lines · Ananth Narayan S

Intel processors export a max supported c state value. But when it comes to c states, typically the one that provides max power savings is exported by the BIOS. The intermediate ones aren't.

-- Ananth Narayan S.

Quoted 21 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#16 lore raw

Hi,
My first question was why CPU states are different from BIOS? If C4 and C5 are good, why and for what reason, the BIOS does not support it. This means that BIOS does not like power saving sates (!)

After that I wondered why my system does not even support C3. So you and Edward said that C3 is mapped to C6. It is understanable that OS map C3 to C6, but since ACPI is a standard, why should CPU, BIOS and OS each one say something different. I am not so expert but I think it is a little bit confusing.

--------------------------
*Mahmood Naderan*

Quoted 35 lines · yakui_zhao
Quoted 16 lines · Mahmood Naderan

I got more confused... In my first post if you see, BIOS reports C1, C2 and C6. Even it does not support C3 (!), but here is the output of "cat /proc/acpi/processor/CPU0/power":

active state:            C0
max_cstate:              C8
bus master activity:     00000000
maximum allowed latency: 2000000000 usec

states:
C1: type[C1] promotion[--] demotion[--]
latency[001] usage[00000063] duration[00000000000000000000]
C2: type[C2] promotion[--] demotion[--]
latency[001] usage[00017466] duration[00000000000014422985]
C3: type[C3] promotion[--] demotion[--]
latency[162] usage[00096196] duration[00000000000650582389]

Quoted 4 lines

So I think something (BIOS or CPU or OS) is malfunctioning and does not report correctly.
Now the big question is, will my system (a combination of CPU, BIOS and OS) enter C3 (or even deeper states)?

What is your problem?

The following info only tells us that the following CPU C-state is supported on the CPU.

Quoted 1 line

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6

But not all the CPU C-state is not used by the OS. It seems that the C1/C2/C6 is used on this box.

At the same time it is noted that the cpu C-state is different with the ACPI C-state. In fact BIOS will do the mapping between the CPU C-state and ACPI C-state. And ACPI C-state is used by the OS.
For example: on your box: The CPU C6 is mapped to ACPI C3-state.

Quoted 80 lines
Quoted 1 line

From the info of "cat /proc/acpi/processor/CPU*/power" we know that your

box can enter the ACPI C3, which is mapped to the CPU C6. Of course it is the deep C-state.

Thanks.

Quoted 72 lines

--------------------------
*Mahmood Naderan*

Quoted 7 lines · Ananth Narayan S

You could see it that way. The OS will use the C states exported by the BIOS. If C4/C5 are not exported, the OS will not even know that such states exist. If you query /proc/acpi/CPU*/power, you'll probably see just three C states listed (C1, C2, C3). Typically the last C-state (C3) in that will map to the lowest C-state supported by the processor.

Quoted 52 lines

-- Ananth

Quoted 45 lines · Mahmood Naderan

Hi,
So if my understanding is correct, the BIOS does not allow the CPU to enter C4 and C5 states. Right?

--------------------------
*Mahmood Naderan*

Quoted 32 lines · Ananth Narayan S

Intel processors export a max supported c state value. But when it comes to c states, typically the one that provides max power savings is exported by the BIOS. The intermediate ones aren't.

-- Ananth Narayan S.

Quoted 21 lines · Mahmood Naderan

Hi,
I have run powertop with root permission with both AC and batter powers. The reported C_States are the same and strange:

mahmood@magma:~$ sudo powertop
PowerTOP 1.11   (C) 2007, 2008 Intel Corporation

Collecting data for 5 seconds

Your CPU supports the following C-states : C1 C2 C3 C4 C5 C6 Your BIOS reports the following C-states : C1 C2 C6

Where are C4 and C5?

--------------------------
*Mahmood Naderan*
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#17 lore raw
Quoted 10 lines · Mahmood Naderan

Hi,
My first question was why CPU states are different from BIOS? If C4 and C5 are good, why and for what reason, the BIOS does not support it. This means that BIOS does not like power saving sates (!)

After that I wondered why my system does not even support C3. So you and Edward said that C3 is mapped to C6. It is understanable that OS map C3 to C6, but since ACPI is a standard, why should CPU, BIOS and OS each one say something different. I am not so expert but I think it is a little bit confusing.

It's the BIOS that does the mapping in terms of what C-states are exposed to the OS. Before ACPI 2.0, only C-states up to C3 were defined. ACPI 2.0 allows more C-states, but I don't know if Windows actually supports them. (Not sure if Windows has full ACPI 2.0 support yet.) That may be why the BIOS people did it that way.