Linux ACPI
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: "Youquan,Song" <youquan.song@linux.intel.com>
Cc: venkatesh.pallipadi@intel.com, kent.liu@intel.com,
	chaohong.guo@intel.com, youquan.song@intel.com,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH]acpi c-states: Fix ACPI C3 is wrongly mapped to C2
Date: Wed, 16 Dec 2009 04:28:25 -0500 (EST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0912160419400.30935@localhost.localdomain> (raw)
In-Reply-To: <20091212181442.GA22832@youquan-linux.bj.intel.com>

I agree that this is confusing.
I disagree that this is the fix.
The fix is actually a lot more complicated,
and it involves the removal of the /proc/acpi/.../power file
modification to /sysfs names from cpuidle,
and fixing powertop.

On Sat, 12 Dec 2009, Youquan,Song wrote:

>     C1:                  type[C1] promotion[--] demotion[--] 
>     C2:                  type[C3] promotion[--] demotion[--] 
> 
> While
> /sys/devices/system/cpu/cpux/cpuidle/state1
> ACPI FFH INTEL MWAIT 0x0
> 1
> C1
> 1000
> 58312355
> 323873
> 
> /sys/devices/system/cpu/cpux/cpuidle/state2
> ACPI FFH INTEL MWAIT 0x10
> 17
> C2
> 500
> 83706664055
> 18926855
> 
> In /proc, "type[C3]" mean acpi C3, but from its title "C2:" mean processor
> support max C-state is ACPI C2.

No, type[C3] means type C3,
and C2: means the 2nd C-state, which in this case happens to be type C3
because a useful state between type C1 and type C3 was not exported.

This is unusual, but not rare.  There were systems before
NHM that did it this way.

> In /sys, there is no any information show that this processor support ACPI C3. 
> 
> these issues are rooted cause to ACPI C2 miss at some platforms, ACPI C3 is
> wrongly mapped to C2.

There is nothing "wrong" with ACPI C2 being mapped to a C3 type state.
The original output above is correct.
The output below is not correct.

> This patch will invalidate ACPI C2 when platform does not support ACPI C2.
> 
> After apply the patch, the C-state information in /proc and /sys are reasonable
> 
> /proc/acpi/processor/CPUx/power
>     C1:                  type[C1] promotion[--] demotion[--] 
>     C2:                  <not supported>
>     C3:                  type[C3] promotion[--] demotion[--] 

That said, I agree this confuses uses, and that doesn't even start
to get into hardware C-states vs ACPI C-states and powertop output...

I believe that powertop is bugged in how it reverse-engineers
the C-state names and displays hardware names.  I think that
we should put the hardware names in /sysfs and it should
simply use them -- but more on that later.

thanks,
Len Brown, Intel Open Source Technology Center

  parent reply	other threads:[~2009-12-16  9:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-12 18:14 [PATCH]acpi c-states: Fix ACPI C3 is wrongly mapped to C2 Youquan,Song
2009-12-12 14:27 ` Dominik Brodowski
2009-12-12 23:55   ` Youquan,Song
2009-12-13  8:43     ` Dominik Brodowski
2009-12-14 10:02       ` Youquan,Song
2009-12-14  8:13         ` Dominik Brodowski
2009-12-14 13:12         ` Youquan,Song
2009-12-14 19:12           ` Pallipadi, Venkatesh
2009-12-16  9:28 ` Len Brown [this message]
2009-12-17 11:19   ` Youquan,Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.0912160419400.30935@localhost.localdomain \
    --to=lenb@kernel.org \
    --cc=chaohong.guo@intel.com \
    --cc=kent.liu@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=youquan.song@intel.com \
    --cc=youquan.song@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox