linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@intel.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Borislav Petkov <bp@alien8.de>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	vincent.guittot@linaro.org, svaidy@linux.vnet.ibm.com,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Paul Turner <pjt@google.com>
Subject: Re: [discussion]sched: a rough proposal to enable power saving in scheduler
Date: Thu, 16 Aug 2012 11:22:18 +0800	[thread overview]
Message-ID: <502C676A.7050001@intel.com> (raw)
In-Reply-To: <1345041802.31459.94.camel@twins>

On 08/15/2012 10:43 PM, Peter Zijlstra wrote:

> On Wed, 2012-08-15 at 15:15 +0200, Borislav Petkov wrote:
>> On Wed, Aug 15, 2012 at 01:05:38PM +0200, Peter Zijlstra wrote:
>>> On Mon, 2012-08-13 at 20:21 +0800, Alex Shi wrote:
>>>> Since there is no power saving consideration in scheduler CFS, I has a
>>>> very rough idea for enabling a new power saving schema in CFS.
>>>
>>> Adding Thomas, he always delights poking holes in power schemes.
>>>
>>>> It bases on the following assumption:
>>>> 1, If there are many task crowd in system, just let few domain cpus
>>>> running and let other cpus idle can not save power. Let all cpu take the
>>>> load, finish tasks early, and then get into idle. will save more power
>>>> and have better user experience.
>>>
>>> I'm not sure this is a valid assumption. I've had it explained to me by
>>> various people that race-to-idle isn't always the best thing. It has to
>>> do with the cost of switching power states and the duration of execution
>>> and other such things.
>>
>> I think what he means here is that we might want to let all cores on
>> the node (i.e., domain) finish and then power down the whole node which
>> should bring much more power savings than letting a subset of the cores
>> idle. Alex?
> 
> Sure we can do that.
> 
>>> So I'd leave the currently implemented scheme as performance, and I
>>> don't think the above describes the current state.
>>>
>>>> 			} else if (schedule policy == power)
>>>> 				move tasks from busiest group to
>>>> 				idlest group until busiest is just full
>>>> 				of capacity.
>>>> 				//the busiest group can balance
>>>> 				//internally after next time LB,
>>>
>>> There's another thing we need to do, and that is collect tasks in a
>>> minimal amount of power domains.
>>
>> Yep.
>>
>> Btw, what heuristic would tell here when a domain overflows and another
>> needs to get woken? Combined load of the whole domain?
>>
>> And if I absolutely positively don't want a node to wake up, do I
>> hotplug its cores off or are we going to have a way to tell the
>> scheduler to overcommit the non-idle domains and spread the tasks only
>> among them.
>>
>> I'm thinking of short bursts here where it would be probably beneficial
>> to let the tasks rather wait runnable for a while then wake up the next
>> node and waste power...
> 
> I was thinking of a utilization measure made of per-task weighted
> runnable averages. This should indeed cover that case and we'll overflow
> when on average there is no (significant) idle time over a period longer
> than the averaging period.


It's also a good idea. :)

> 
> Anyway, I'm not too set on this and I'm very sure we can tweak this ad
> infinitum, so starting with something relatively simple that works for
> most is preferred.
> 
> As already stated, I think some of the Linaro people actually played
> around with something like this based on PJTs patches.


Vincent, would you like to introduce more?

  reply	other threads:[~2012-08-16  3:22 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 12:21 [discussion]sched: a rough proposal to enable power saving in scheduler Alex Shi
2012-08-14  7:35 ` Alex Shi
2012-08-15  8:23   ` Peter Zijlstra
2012-08-15 11:05 ` Peter Zijlstra
2012-08-15 13:15   ` Borislav Petkov
2012-08-15 14:43     ` Peter Zijlstra
2012-08-16  3:22       ` Alex Shi [this message]
2012-08-16  3:09     ` Alex Shi
2012-08-15 13:45   ` Arjan van de Ven
2012-08-15 14:39     ` Peter Zijlstra
2012-08-15 14:43       ` Arjan van de Ven
2012-08-15 15:04         ` Peter Zijlstra
2012-08-15 17:59           ` Arjan van de Ven
2012-08-20  8:06             ` Ingo Molnar
2012-08-20  8:26               ` Peter Zijlstra
2012-08-20 13:26               ` Arjan van de Ven
2012-08-20 18:16               ` Matthew Garrett
2012-08-21  9:42                 ` Ingo Molnar
2012-08-21 11:39                   ` Matthew Garrett
2012-08-21 15:19                     ` Ingo Molnar
2012-08-21 15:21                       ` Arjan van de Ven
2012-08-21 15:28                       ` Matthew Garrett
2012-08-21 15:59                         ` Ingo Molnar
2012-08-21 16:13                           ` Matthew Garrett
2012-08-21 18:23                             ` Ingo Molnar
2012-08-21 18:34                               ` Matthew Garrett
2012-08-22  9:10                                 ` Ingo Molnar
2012-08-22 11:35                                   ` Matthew Garrett
2012-08-23  8:19                                   ` Alex Shi
2012-08-21 18:52                               ` Alan Cox
2012-08-22  9:03                                 ` Ingo Molnar
2012-08-22 11:00                                   ` Alan Cox
2012-08-22 11:33                                     ` Ingo Molnar
2012-08-22 12:58                                       ` Alan Cox
2012-08-21 16:02                       ` Alan Cox
2012-08-22  5:41                         ` Mike Galbraith
2012-08-22 13:02                           ` Arjan van de Ven
2012-08-22 13:09                             ` Mike Galbraith
2012-08-22 13:21                             ` Matthew Garrett
2012-08-22 13:23                               ` Arjan van de Ven
2012-08-16  1:14         ` Rik van Riel
2012-08-16  1:17           ` Arjan van de Ven
2012-08-16  1:21           ` Arjan van de Ven
2012-08-15 14:19   ` Arjan van de Ven
2012-08-15 14:44     ` Peter Zijlstra
2012-08-15 14:47       ` Thomas Gleixner
2012-08-15 16:23   ` Matthew Garrett
2012-08-15 16:34   ` Matthew Garrett
2012-08-15 18:02     ` Arjan van de Ven
2012-08-17  8:59       ` Paul Turner
2012-08-16  3:07   ` Alex Shi
2012-08-16  6:53   ` preeti
2012-08-16  9:58     ` Alex Shi
2012-08-16 12:45     ` Shilimkar, Santosh
2012-08-16 14:01     ` Arjan van de Ven
2012-08-16 18:45       ` Rik van Riel
2012-08-16 19:20         ` Arjan van de Ven
2012-08-17  1:29       ` Alex Shi
2012-08-17 18:41       ` Matthew Garrett
2012-08-17 18:44         ` Arjan van de Ven
2012-08-17 18:47           ` Matthew Garrett
2012-08-17 19:45             ` Chris Friesen
2012-08-17 19:50               ` Matthew Garrett
2012-08-17 20:16                 ` Chris Friesen
2012-08-18 14:33                   ` Luming Yu
2012-08-18 14:52                     ` Arjan van de Ven
2012-08-16 14:31   ` Morten Rasmussen
2012-08-19 10:12     ` Juri Lelli
2012-08-17  8:43   ` Paul Turner
2012-08-20 15:55     ` Vincent Guittot
2012-08-20 15:36   ` Vincent Guittot
2012-08-21  0:58     ` Alex Shi
2012-08-21 11:05       ` Vincent Guittot
2012-08-15 14:24 ` Rakib Mullick
2012-08-15 14:55   ` Peter Zijlstra
2012-08-15 22:58     ` Rakib Mullick
2012-08-16  5:26     ` Alex Shi
2012-08-16  4:57   ` Alex Shi
2012-08-16  8:05     ` Rakib Mullick
2012-08-15 16:19 ` Matthew Garrett
2012-08-16  5:03   ` Alex Shi
2012-08-16  5:31     ` Matthew Garrett
2012-08-16  5:39       ` Alex Shi
2012-08-16  5:45         ` Matthew Garrett
2012-08-16 13:57     ` Arjan van de Ven
2012-08-20 15:47       ` Christoph Lameter
2012-08-20 15:52         ` Matthew Garrett
2012-08-20 19:22           ` Christoph Lameter
2012-08-20 15:47     ` Vincent Guittot
2012-08-21  1:05       ` Alex Shi

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=502C676A.7050001@intel.com \
    --to=alex.shi@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pjt@google.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=vincent.guittot@linaro.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 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).