linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	peterz@infradead.org, rjw@rjwysocki.net,
	linux-pm@vger.kernel.org, alex.shi@linaro.org,
	vincent.guittot@linaro.org, morten.rasmussen@arm.com
Subject: Re: [RFC PATCHC 3/3] sched/fair: use the idle state info to choose the idlest cpu
Date: Thu, 17 Apr 2014 18:05:07 +0200	[thread overview]
Message-ID: <534FFBB3.8050601@linaro.org> (raw)
In-Reply-To: <alpine.LFD.2.11.1404171138470.980@knanqh.ubzr>

On 04/17/2014 05:53 PM, Nicolas Pitre wrote:
> On Thu, 17 Apr 2014, Daniel Lezcano wrote:
>
>> Ok, refreshed the patchset but before sending it out I would to discuss about
>> the rational of the changes and the policy, and change the patchset
>> consequently.
>>
>> What order to choose if the cpu is idle ?
>>
>> Let's assume all cpus are idle on a dual socket quad core.
>>
>> Also, we can reasonably do the hypothesis if the cluster is in low power mode,
>> the cpus belonging to the same cluster are in the same idle state (putting
>> apart the auto-promote where we don't have control on).
>>
>> If the policy you talk above is 'aggressive power saving', we can follow the
>> rules with decreasing priority:
>>
>> 1. We want to prevent to wakeup the entire cluster
>> 	=> as the cpus are in the same idle state, by choosing a cpu in
>> 	=> shallow
>> state, we should have the guarantee we won't wakeup a cluster (except if no
>> shallowest idle cpu are found).
>
> This is unclear to me.  Obviously, if an entire cluster is down, that
> means all the CPUs it contains have been idle for a long time.  And
> therefore they shouldn't be subject to selection unless there is no
> other CPUs available.  Is that what you mean?

Yes, this is what I meant. But also what I meant is we can get rid for 
the moment of the cpu topology and the coupling idle state because if we 
do this described approach, as the idle state will be the same for the 
cpus belonging to the same cluster we won't select a cluster down 
(except if there is no other CPUs available).

>> 2. We want to prevent to wakeup a cpu which did not reach the target residency
>> time (will need some work to unify cpuidle idle time and idle task run time)
>> 	=> with the target residency and, as a first step, with the idle
>> 	=> stamp,
>> we can determine if the cpu slept enough
>
> Agreed. However, right now, the scheduler does not have any
> consideration for that.  So this should be done as a separate patch.

Yes, I thought as a very first step we can rely on the idle stamp until 
we unify the times with a big comment. Or I can first unify the idle 
times and then take into account the target residency. It is to comply 
with Rafael's request to have the 'big picture'.

>> 3. We want to prevent to wakeup a cpu in deep idle state
>> 	=> by looking for the cpu in shallowest idle state
>
> Obvious.
>
>> 4. We want to prevent to wakeup a cpu where the exit latency is longer than
>> the expected run time of the task (and the time to migrate the task ?)
>
> Sure.  That would be a case for using task packing even if the policy is
> set to performance rather than powersave whereas task packing is
> normally for powersave.

Yes, I agree, task packing improves also the performances and it makes 
really sense to prevent task migration under some circumstances for a 
better cache efficiency.

Thanks for the comments

   -- Daniel

-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  reply	other threads:[~2014-04-17 16:04 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28 12:29 [RFC PATCHC 0/3] sched/idle : find the idlest cpu with cpuidle info Daniel Lezcano
2014-03-28 12:29 ` [RFC PATCHC 1/3] cpuidle: encapsulate power info in a separate structure Daniel Lezcano
2014-03-28 18:17   ` Nicolas Pitre
2014-03-28 20:42     ` Daniel Lezcano
2014-03-29  0:00       ` Nicolas Pitre
2014-03-28 12:29 ` [RFC PATCHC 2/3] idle: store the idle state the cpu is Daniel Lezcano
2014-04-15 12:43   ` Peter Zijlstra
2014-04-15 12:44     ` Peter Zijlstra
2014-04-15 14:17       ` Daniel Lezcano
2014-04-15 14:33         ` Peter Zijlstra
2014-04-15 14:39           ` Daniel Lezcano
2014-03-28 12:29 ` [RFC PATCHC 3/3] sched/fair: use the idle state info to choose the idlest cpu Daniel Lezcano
2014-04-02  3:05   ` Nicolas Pitre
2014-04-04 11:57     ` Rafael J. Wysocki
2014-04-04 16:56       ` Nicolas Pitre
2014-04-05  2:01         ` Rafael J. Wysocki
2014-04-17 13:53     ` Daniel Lezcano
2014-04-17 14:47       ` Peter Zijlstra
2014-04-17 15:03         ` Daniel Lezcano
2014-04-18  8:09           ` Ingo Molnar
2014-04-18  8:36             ` Daniel Lezcano
2014-04-17 15:53       ` Nicolas Pitre
2014-04-17 16:05         ` Daniel Lezcano [this message]
2014-04-17 16:21           ` Nicolas Pitre
2014-04-18  9:38             ` Peter Zijlstra
2014-04-18 12:13               ` Daniel Lezcano
2014-04-18 12:53                 ` Peter Zijlstra
2014-04-18 13:04                   ` Daniel Lezcano
2014-04-18 16:00                     ` Nicolas Pitre
2014-04-15 13:03   ` Peter Zijlstra
2014-03-31 13:52 ` [RFC PATCHC 0/3] sched/idle : find the idlest cpu with cpuidle info Vincent Guittot
2014-03-31 15:55   ` Daniel Lezcano
2014-04-01  7:16     ` Vincent Guittot
2014-04-01  7:43       ` Daniel Lezcano
2014-04-01  9:05         ` Vincent Guittot
2014-04-15 13:13           ` Peter Zijlstra
2014-04-01 23:01 ` Rafael J. Wysocki
2014-04-02  3:14   ` Nicolas Pitre
2014-04-04 11:43     ` Rafael J. Wysocki
2014-04-15 13:17       ` Peter Zijlstra
2014-04-15 13:25       ` Peter Zijlstra
2014-04-15 15:27         ` Nicolas Pitre
2014-04-15 15:33         ` Rafael J. Wysocki
2014-04-02  8:26   ` Daniel Lezcano
2014-04-04 11:23     ` Rafael J. Wysocki
2014-04-04  6:29 ` Len Brown
2014-04-04  8:16   ` Daniel Lezcano

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=534FFBB3.8050601@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=alex.shi@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=morten.rasmussen@arm.com \
    --cc=nicolas.pitre@linaro.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --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).