linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BIOS and CPU C_states are strange
       [not found] <1acba2fa0906191006i3cd5a035pf18e096fdb92e27e@mail.gmail.com>
@ 2009-06-19 17:07 ` Mahmood Naderan
       [not found]   ` <ff05f3d00906191956m48655da5wc28a5553220ffdd0@mail.gmail.com>
       [not found]   ` <a8ca10150906200826l37a7ee2fs283ecfa955697c49@mail.gmail.com>
  0 siblings, 2 replies; 11+ messages in thread
From: Mahmood Naderan @ 2009-06-19 17:07 UTC (permalink / raw)
  To: linux-acpi

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*

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
       [not found]   ` <ff05f3d00906191956m48655da5wc28a5553220ffdd0@mail.gmail.com>
@ 2009-06-20  6:54     ` Mahmood Naderan
       [not found]       ` <ff05f3d00906210249j6286e6cfw5fff9535e02839e0@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Mahmood Naderan @ 2009-06-20  6:54 UTC (permalink / raw)
  To: linux-acpi

Hi,
> 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*



On Sat, Jun 20, 2009 at 7:26 AM, Edward Shao <laface.tw@gmail.com> wrote:
>
> 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
>
>
> On Sat, Jun 20, 2009 at 1:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
> > 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 majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
>
>
>
> --
> Best Regards,
> Edward
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* BIOS and CPU C_states are strange
       [not found]         ` <1acba2fa0906210218o59a6c92fi86e30891c0816b5d@mail.gmail.com>
@ 2009-06-21  9:20           ` Mahmood Naderan
  2009-06-21 10:06             ` Edward Shao
  2009-06-22  1:34             ` yakui_zhao
  0 siblings, 2 replies; 11+ messages in thread
From: Mahmood Naderan @ 2009-06-21  9:20 UTC (permalink / raw)
  To: linux-acpi

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*




On Sun, Jun 21, 2009 at 2:34 AM, Ananth Narayan
S<ananth.narayan@gmail.com> wrote:
> 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.
>
> -- Ananth
>
>
>
>
> On Sat, Jun 20, 2009 at 8:46 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>> Hi,
>> So if my understanding is correct, the BIOS does not allow the CPU to
>> enter C4 and C5 states. Right?
>>
>> --------------------------
>> *Mahmood Naderan*
>>
>>
>>
>>
>> On Sat, Jun 20, 2009 at 7:56 PM, Ananth Narayan
>> S<ananth.narayan@gmail.com> wrote:
>>> 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.
>>>
>>>
>>>
>>>
>>> On Fri, Jun 19, 2009 at 10:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>>> 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 majordomo@vger.kernel.org
>>>> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
       [not found]       ` <ff05f3d00906210249j6286e6cfw5fff9535e02839e0@mail.gmail.com>
@ 2009-06-21 10:02         ` Mahmood Naderan
  2009-06-21 10:13           ` Edward Shao
  0 siblings, 1 reply; 11+ messages in thread
From: Mahmood Naderan @ 2009-06-21 10:02 UTC (permalink / raw)
  To: linux-acpi

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




On Sun, Jun 21, 2009 at 2:19 PM, Edward Shao<laface.tw@gmail.com> wrote:
> 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
>
> On Sat, Jun 20, 2009 at 2:54 PM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>> Hi,
>>> 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*
>>
>>
>>
>> On Sat, Jun 20, 2009 at 7:26 AM, Edward Shao <laface.tw@gmail.com> wrote:
>>>
>>> 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
>>>
>>>
>>> On Sat, Jun 20, 2009 at 1:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>> > 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 majordomo@vger.kernel.org
>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>> >
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Edward
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>
>
> --
> Best Regards,
> Edward
>
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
  2009-06-21  9:20           ` Mahmood Naderan
@ 2009-06-21 10:06             ` Edward Shao
  2009-06-21 10:14               ` Mahmood Naderan
  2009-06-22  1:34             ` yakui_zhao
  1 sibling, 1 reply; 11+ messages in thread
From: Edward Shao @ 2009-06-21 10:06 UTC (permalink / raw)
  To: linux-acpi

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

Best Regards,
Edward

On Sun, Jun 21, 2009 at 5:20 PM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
> 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*
>
>
>
>
> On Sun, Jun 21, 2009 at 2:34 AM, Ananth Narayan
> S<ananth.narayan@gmail.com> wrote:
>> 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.
>>
>> -- Ananth
>>
>>
>>
>>
>> On Sat, Jun 20, 2009 at 8:46 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>> Hi,
>>> So if my understanding is correct, the BIOS does not allow the CPU to
>>> enter C4 and C5 states. Right?
>>>
>>> --------------------------
>>> *Mahmood Naderan*
>>>
>>>
>>>
>>>
>>> On Sat, Jun 20, 2009 at 7:56 PM, Ananth Narayan
>>> S<ananth.narayan@gmail.com> wrote:
>>>> 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.
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Jun 19, 2009 at 10:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>>>> 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 majordomo@vger.kernel.org
>>>>> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
  2009-06-21 10:02         ` Mahmood Naderan
@ 2009-06-21 10:13           ` Edward Shao
  2009-06-21 10:26             ` Mahmood Naderan
  0 siblings, 1 reply; 11+ messages in thread
From: Edward Shao @ 2009-06-21 10:13 UTC (permalink / raw)
  To: linux-acpi

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

On Sun, Jun 21, 2009 at 6:02 PM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
> Hi,
> 1- where can I find powertop source code?
> 2- what is the name of intel utility in windows as you said?
> --------------------------
> *Mahmood Naderan*
>
>
>
>
> On Sun, Jun 21, 2009 at 2:19 PM, Edward Shao<laface.tw@gmail.com> wrote:
>> 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
>>
>> On Sat, Jun 20, 2009 at 2:54 PM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>> Hi,
>>>> 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*
>>>
>>>
>>>
>>> On Sat, Jun 20, 2009 at 7:26 AM, Edward Shao <laface.tw@gmail.com> wrote:
>>>>
>>>> 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
>>>>
>>>>
>>>> On Sat, Jun 20, 2009 at 1:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>>> > 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 majordomo@vger.kernel.org
>>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Edward
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Edward
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
  2009-06-21 10:06             ` Edward Shao
@ 2009-06-21 10:14               ` Mahmood Naderan
  0 siblings, 0 replies; 11+ messages in thread
From: Mahmood Naderan @ 2009-06-21 10:14 UTC (permalink / raw)
  To: linux-acpi

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*




On Sun, Jun 21, 2009 at 2:36 PM, Edward Shao<laface.tw@gmail.com> wrote:
> Hi~
> In your case, typically C3 should map to CPU C6.
>
> Best Regards,
> Edward
>
> On Sun, Jun 21, 2009 at 5:20 PM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>> 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*
>>
>>
>>
>>
>> On Sun, Jun 21, 2009 at 2:34 AM, Ananth Narayan
>> S<ananth.narayan@gmail.com> wrote:
>>> 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.
>>>
>>> -- Ananth
>>>
>>>
>>>
>>>
>>> On Sat, Jun 20, 2009 at 8:46 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>>> Hi,
>>>> So if my understanding is correct, the BIOS does not allow the CPU to
>>>> enter C4 and C5 states. Right?
>>>>
>>>> --------------------------
>>>> *Mahmood Naderan*
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Jun 20, 2009 at 7:56 PM, Ananth Narayan
>>>> S<ananth.narayan@gmail.com> wrote:
>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jun 19, 2009 at 10:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>>>>> 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 majordomo@vger.kernel.org
>>>>>> 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 majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>
>
> --
> Best Regards,
> Edward
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
  2009-06-21 10:13           ` Edward Shao
@ 2009-06-21 10:26             ` Mahmood Naderan
  0 siblings, 0 replies; 11+ messages in thread
From: Mahmood Naderan @ 2009-06-21 10:26 UTC (permalink / raw)
  To: linux-acpi

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*




On Sun, Jun 21, 2009 at 2:43 PM, Edward Shao<laface.tw@gmail.com> wrote:
> 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
>
> On Sun, Jun 21, 2009 at 6:02 PM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>> Hi,
>> 1- where can I find powertop source code?
>> 2- what is the name of intel utility in windows as you said?
>> --------------------------
>> *Mahmood Naderan*
>>
>>
>>
>>
>> On Sun, Jun 21, 2009 at 2:19 PM, Edward Shao<laface.tw@gmail.com> wrote:
>>> 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
>>>
>>> On Sat, Jun 20, 2009 at 2:54 PM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>>> Hi,
>>>>> 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*
>>>>
>>>>
>>>>
>>>> On Sat, Jun 20, 2009 at 7:26 AM, Edward Shao <laface.tw@gmail.com> wrote:
>>>>>
>>>>> 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
>>>>>
>>>>>
>>>>> On Sat, Jun 20, 2009 at 1:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
>>>>> > 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 majordomo@vger.kernel.org
>>>>> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Edward
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Edward
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>
>
> --
> Best Regards,
> Edward
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
  2009-06-21  9:20           ` Mahmood Naderan
  2009-06-21 10:06             ` Edward Shao
@ 2009-06-22  1:34             ` yakui_zhao
  2009-06-22  6:54               ` Mahmood Naderan
  1 sibling, 1 reply; 11+ messages in thread
From: yakui_zhao @ 2009-06-22  1:34 UTC (permalink / raw)
  To: Mahmood Naderan; +Cc: linux-acpi@vger.kernel.org

On Sun, 2009-06-21 at 17:20 +0800, Mahmood Naderan wrote:
> 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)?
What is your problem?

The following info only tells us that the following CPU C-state is
supported on the CPU.
>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.

>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.

> 
> --------------------------
> *Mahmood Naderan*
> 
> 
> 
> 
> On Sun, Jun 21, 2009 at 2:34 AM, Ananth Narayan
> S<ananth.narayan@gmail.com> wrote:
> > 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.
> >
> > -- Ananth
> >
> >
> >
> >
> > On Sat, Jun 20, 2009 at 8:46 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
> >> Hi,
> >> So if my understanding is correct, the BIOS does not allow the CPU to
> >> enter C4 and C5 states. Right?
> >>
> >> --------------------------
> >> *Mahmood Naderan*
> >>
> >>
> >>
> >>
> >> On Sat, Jun 20, 2009 at 7:56 PM, Ananth Narayan
> >> S<ananth.narayan@gmail.com> wrote:
> >>> 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.
> >>>
> >>>
> >>>
> >>>
> >>> On Fri, Jun 19, 2009 at 10:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
> >>>> 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 majordomo@vger.kernel.org
> >>>> 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 majordomo@vger.kernel.org
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
  2009-06-22  1:34             ` yakui_zhao
@ 2009-06-22  6:54               ` Mahmood Naderan
  2009-06-23  5:16                 ` Robert Hancock
  0 siblings, 1 reply; 11+ messages in thread
From: Mahmood Naderan @ 2009-06-22  6:54 UTC (permalink / raw)
  To: linux-acpi

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*



On 6/22/09, yakui_zhao <yakui.zhao@intel.com> wrote:
> On Sun, 2009-06-21 at 17:20 +0800, Mahmood Naderan wrote:
> > 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)?
> What is your problem?
>
> The following info only tells us that the following CPU C-state is
> supported on the CPU.
> >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.
>
> >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.
>
> >
> > --------------------------
> > *Mahmood Naderan*
> >
> >
> >
> >
> > On Sun, Jun 21, 2009 at 2:34 AM, Ananth Narayan
> > S<ananth.narayan@gmail.com> wrote:
> > > 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.
> > >
> > > -- Ananth
> > >
> > >
> > >
> > >
> > > On Sat, Jun 20, 2009 at 8:46 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
> > >> Hi,
> > >> So if my understanding is correct, the BIOS does not allow the CPU to
> > >> enter C4 and C5 states. Right?
> > >>
> > >> --------------------------
> > >> *Mahmood Naderan*
> > >>
> > >>
> > >>
> > >>
> > >> On Sat, Jun 20, 2009 at 7:56 PM, Ananth Narayan
> > >> S<ananth.narayan@gmail.com> wrote:
> > >>> 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.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> On Fri, Jun 19, 2009 at 10:07 AM, Mahmood Naderan<mahmood.nt@gmail.com> wrote:
> > >>>> 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 majordomo@vger.kernel.org
> > >>>> 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 majordomo@vger.kernel.org
> > 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: BIOS and CPU C_states are strange
  2009-06-22  6:54               ` Mahmood Naderan
@ 2009-06-23  5:16                 ` Robert Hancock
  0 siblings, 0 replies; 11+ messages in thread
From: Robert Hancock @ 2009-06-23  5:16 UTC (permalink / raw)
  To: Mahmood Naderan; +Cc: linux-acpi

On 06/22/2009 12:54 AM, Mahmood Naderan wrote:
> 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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-06-23  5:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1acba2fa0906191006i3cd5a035pf18e096fdb92e27e@mail.gmail.com>
2009-06-19 17:07 ` BIOS and CPU C_states are strange Mahmood Naderan
     [not found]   ` <ff05f3d00906191956m48655da5wc28a5553220ffdd0@mail.gmail.com>
2009-06-20  6:54     ` Mahmood Naderan
     [not found]       ` <ff05f3d00906210249j6286e6cfw5fff9535e02839e0@mail.gmail.com>
2009-06-21 10:02         ` Mahmood Naderan
2009-06-21 10:13           ` Edward Shao
2009-06-21 10:26             ` Mahmood Naderan
     [not found]   ` <a8ca10150906200826l37a7ee2fs283ecfa955697c49@mail.gmail.com>
     [not found]     ` <1acba2fa0906200846r751cf235q9e155e5445090d40@mail.gmail.com>
     [not found]       ` <a8ca10150906201504p2186b3fbg5ac7761946f48697@mail.gmail.com>
     [not found]         ` <1acba2fa0906210218o59a6c92fi86e30891c0816b5d@mail.gmail.com>
2009-06-21  9:20           ` Mahmood Naderan
2009-06-21 10:06             ` Edward Shao
2009-06-21 10:14               ` Mahmood Naderan
2009-06-22  1:34             ` yakui_zhao
2009-06-22  6:54               ` Mahmood Naderan
2009-06-23  5:16                 ` Robert Hancock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).