All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Haskins <ghaskins@novell.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: sched: deep power-saving states
Date: Wed, 22 Oct 2008 10:26:49 -0400	[thread overview]
Message-ID: <48FF3829.8040704@novell.com> (raw)
In-Reply-To: <20081022070701.567f1c9a@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 2683 bytes --]

Arjan van de Ven wrote:
> On Wed, 22 Oct 2008 10:05:21 -0400
> Gregory Haskins <ghaskins@novell.com> wrote:
>
>   
>> Arjan van de Ven wrote:
>>     
>>> On Wed, 22 Oct 2008 09:42:52 -0400
>>> Gregory Haskins <gregory.haskins.ml@gmail.com> wrote:
>>>
>>>   
>>>       
>>>> What I was thinking is that a simple mechanism to quantify the
>>>> power-state penalty would be to add those states as priority
>>>> levels in the cpupri namespace.  E.g. We could substitute
>>>> IDLE-RUNNING for IDLE, and add IDLE-PS1, IDLE-PS2, .. IDLE-PSn,
>>>> OTHER, RT1, .. RT99.  This means the scheduler would favor waking
>>>> an IDLE-RUNNING core over an IDLE-PS1-PSn, etc.  The question in
>>>> my mind is: can the power-states be determined in a static fashion
>>>> such that we know what value to quantify the idle state before we
>>>> enter it?  Or is it more dynamic (e.g. the longer it is in an
>>>> MWAIT, the deeper the sleep gets). 
>>>>         
>>> it's a little dynamic, but just assuming the worst will be a very
>>> good approximation of reality. And we know what we're getting into
>>> in that sense.
>>>   
>>>       
>> Ok, but if we just assume the worst case always, how do I
>> differentiate between, say, IDLE-RUNNING and IDLE-PSn?  If I assign
>> them all to IDLE-PSn apriori its no better than the basic single IDLE
>> state we support today.  Or am I misunderstanding you?
>>     
>
> eh yes I wasn't very clear; it's pre-coffee time here ;)
>
> we know *for each C state* we go in, what its maximum latency is.
> Now, that is the *maximum*; there are times where it'll be less
> (there are several steps for going into a C-state hardware wise, and if
> an interrupt comes in before they're all completed, getting out of it
> means not having to undo ALL the steps, so it'll be faster)
>   

[Adding Peter Zijlstra to the thread]

Ah, yes of course!   That makes sense.  So I have to admit I am fairly
ignorant of the ACPI C-state stuff, so I just read up on it.  In the
context of what you said, it makes perfect sense to me now.

IIUC, the OS selects which C-state it will enter at idle points based on
some internal criteria (TBD).  All we have to do is remap the cpupri
"IDLE" state to something like IDLE-C1, IDLE-C2, ..., IDLE-Cn and have
the cpupri map get updated coincident with the pm_idle() call.  Then the
scheduler will naturally favor cores that are in lighter sleep over
cores in deep sleep.

I am not sure if this is exactly what you were getting at during the
conf, since it doesnt really consider deep-sleep latency times
directly.  But I think this is a step in the right direction.

-Greg



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2008-10-22 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 13:42 sched: deep power-saving states Gregory Haskins
2008-10-22 13:47 ` Arjan van de Ven
2008-10-22 14:05   ` Gregory Haskins
2008-10-22 14:07     ` Arjan van de Ven
2008-10-22 14:26       ` Gregory Haskins [this message]
2008-10-22 14:36         ` Arjan van de Ven
2008-10-22 19:49           ` Peter Zijlstra
2008-10-22 19:55             ` Arjan van de Ven
2008-10-22 20:05               ` Peter Zijlstra
2008-10-22 20:12                 ` Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2008-10-22 13:44 Gregory Haskins

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=48FF3829.8040704@novell.com \
    --to=ghaskins@novell.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.