public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI, CPU_IDLE: Add more information about C-states
Date: Thu, 14 Feb 2008 15:41:20 -0500	[thread overview]
Message-ID: <200802141541.20143.lenb@kernel.org> (raw)
In-Reply-To: <924EFEDD5F540B4284297C4DC59F3DEE8C3E68@orsmsx423.amr.corp.intel.com>

On Thursday 14 February 2008 11:52, Pallipadi, Venkatesh wrote:
> 
> 'usage' is a counter that counts every time we get into poll_idle
> routine. I also try to keep track of time spent in poll_idle, until
> need_resched sends us out. That time is accumulated in 'time'.
> Just have those to be consistent with other state and to be sure that
> powertop kind of tools wont get confused.

yes, the consistency is good.
But my question is when and why we enter poll_idle at all.

> I agree with the 'power' number. I did not like that 4294967295 there.
> But, I had to put some number higher than other C-states, maximum
> possible seemed logical. May be I can change the sysfs interface to
> print <NULL> or something like that for power?

I dunno.  Somehow I like 0 to signify an unknown quantity
rather than a huge number.  If somebody actually looks at it
with a program,  they're going to have to special case either of them,
and 0 seems simpler.

thanks,
-Len


> >
> >I'm confused by state0 -- why are usage and time non-zero --
> >is this due to some residency there during initialization?
> >
> >I don't know if I like the looks of 2^32 - 1 as the power number...
> >
> >-Len
> >
> >[root@t61 cpuidle]# 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[00000000] duration[00000000000000000000]
> >    C2:                  type[C2] promotion[--] demotion[--] 
> >latency[001] usage[00000161] duration[00000000000000018522]
> >    C3:                  type[C3] promotion[--] demotion[--] 
> >latency[017] usage[00088238] duration[00000000002957934702]
> >[root@t61 cpuidle]# grep . */*
> >state0/desc:CPUIDLE CORE POLL IDLE
> >state0/latency:0
> >state0/name:C0
> >state0/power:4294967295
> >state0/time:11623
> >state0/usage:6
> >state1/desc:ACPI FFH INTEL MWAIT 0x0
> >state1/latency:1
> >state1/name:C1
> >state1/power:1000
> >state1/time:0
> >state1/usage:0
> >state2/desc:ACPI FFH INTEL MWAIT 0x10
> >state2/latency:1
> >state2/name:C2
> >state2/power:500
> >state2/time:5104
> >state2/usage:163
> >state3/desc:ACPI FFH INTEL MWAIT 0x20
> >state3/latency:17
> >state3/name:C3
> >state3/power:250
> >state3/time:830738297
> >state3/usage:89280
> >
> >of course this isnt' new with this patch -- 2.6.25-rc1 looks as below:
> >
> >[root@t61 cpuidle]# 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[00000000] duration[00000000000000000000]
> >    C2:                  type[C2] promotion[--] demotion[--] 
> >latency[001] usage[00000202] duration[00000000000000028172]
> >    C3:                  type[C3] promotion[--] demotion[--] 
> >latency[017] usage[00026011] duration[00000000000264174466]
> >[root@t61 cpuidle]# grep . */*
> >state0/latency:0
> >state0/name:C0 (poll idle)
> >state0/power:4294967295
> >state0/time:35713
> >state0/usage:6
> >state1/latency:1
> >state1/name:C1
> >state1/power:1000
> >state1/time:0
> >state1/usage:0
> >state2/latency:1
> >state2/name:C2
> >state2/power:500
> >state2/time:7771
> >state2/usage:203
> >state3/latency:17
> >state3/name:C3
> >state3/power:250
> >state3/time:74950731
> >state3/usage:26286
> >
> >and 2.6.24 showed no C0, as expected.
> >
> >[root@t61 cpuidle]# cat /proc/acpi/processor/CPU0/power
> >active state:            C0
> >max_cstate:              C8
> >bus master activity:     00000000
> >maximum allowed latency: 2000 usec
> >states:
> >    C1:                  type[C1] promotion[--] demotion[--] 
> >latency[001] usage[00000030] duration[00000000000000000000]
> >    C2:                  type[C2] promotion[--] demotion[--] 
> >latency[001] usage[00000714] duration[00000000000000531448]
> >    C3:                  type[C3] promotion[--] demotion[--] 
> >latency[017] usage[00020563] duration[00000000000168147357]
> >[root@t61 cpuidle]# grep . */*
> >state0/latency:1
> >state0/name:C1
> >state0/power:1000
> >state0/time:0
> >state0/usage:30
> >state1/latency:1
> >state1/name:C2
> >state1/power:500
> >state1/time:148317
> >state1/usage:719
> >state2/latency:17
> >state2/name:C3
> >state2/power:250
> >state2/time:48238649
> >state2/usage:21034
> >[root@t61 cpuidle]#                        
> >
> 

  reply	other threads:[~2008-02-14 20:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12  1:50 [PATCH] ACPI, CPU_IDLE: Add more information about C-states Venki Pallipadi
2008-02-14  5:10 ` Len Brown
2008-02-14  8:09   ` Len Brown
2008-02-14 16:52     ` Pallipadi, Venkatesh
2008-02-14 20:41       ` Len Brown [this message]
2008-02-15  0:42         ` Pallipadi, Venkatesh
2008-02-15  4:52           ` Len Brown

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=200802141541.20143.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=venkatesh.pallipadi@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