linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Morten Rasmussen <morten.rasmussen@arm.com>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: David Lang <david@lang.hm>, Ingo Molnar <mingo@kernel.org>,
	"alex.shi@intel.com" <alex.shi@intel.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"preeti@linux.vnet.ibm.com" <preeti@linux.vnet.ibm.com>,
	"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
	"efault@gmx.de" <efault@gmx.de>,
	"pjt@google.com" <pjt@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linaro-kernel@lists.linaro.org" <linaro-kernel@lists.linaro.org>,
	"len.brown@intel.com" <len.brown@intel.com>,
	"corbet@lwn.net" <corbet@lwn.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	Catalin Marinas <Catalin.Marinas@arm.com>
Subject: Re: power-efficient scheduling design
Date: Fri, 21 Jun 2013 09:50:02 +0100	[thread overview]
Message-ID: <20130621085002.GJ5460@e103034-lin> (raw)
In-Reply-To: <51C1E58D.9000408@linux.intel.com>

On Wed, Jun 19, 2013 at 06:08:29PM +0100, Arjan van de Ven wrote:
> On 6/19/2013 10:00 AM, Morten Rasmussen wrote:
> > On Wed, Jun 19, 2013 at 04:39:39PM +0100, Arjan van de Ven wrote:
> >> On 6/18/2013 10:47 AM, David Lang wrote:
> >>
> >>>
> >>> It's bad enough trying to guess the needs of the processes, but if you also are reduced to guessing the capabilities of the cores, how can anything be made to work?
> >>
> >> btw one way to look at this is to assume that (with some minimal hinting)
> >> the CPU driver will do the right thing and get you just about the best performance you can get
> >> (that is appropriate for the task at hand)...
> >> ... and don't do anything in the scheduler proactively.
> >
> > If I understand correctly, you mean if your hardware/firmware is fully
> 
> hardware, firmware and the driver
> 
> > in control of the p-state selection and changes it fast enough to match
> > the current load, the scheduler doesn't have to care? By fast enough I
> > mean, faster than the scheduler would notice if a cpu was temporarily
> > overloaded at a low p-state. In that case, you wouldn't need
> > cpufreq/p-state hints, and the scheduler would only move tasks between
> > cpus when cpus are fully loaded at their max p-state.
> 
> with the migration hint, I'm pretty sure we'll be there today typically.

A hint when a task is moved to a new cpu is too late if the migration
shouldn't have happened at all. If the scheduler knows that the cpu is
able to switch to a higher p-state it can decide to wait for the p-state
change instead of migrating the task and waking up another cpu.

> we'll notice within 10 msec regardless, but the migration hint will take
> the edge of those 10 msec normally.

I'm not sure if 10 msec is fast enough for the scheduler to not notice.
Real use-case studies will tell.

> 
> I would argue that the "at their max p-state" in your sentence needs to go away.
> since you don't know what you actually are except in hindsight.
> And even then you don't know if you could have gone higher or not.

Yes. What I meant was that if your p-state selection is responsive
enough the scheduler would only see the cpu as overloaded when it is in
its highest available p-state. That may determined dynamically by power,
thermal, and other factors.

> 
> 
> >> the hints I have in mind are not all that complex; we have the biggest issues today
> >> around task migration (the task migrates to a cold cpu... so a simple notifier chain
> >> on the new cpu as it is accepting a task and we can bump it up), real time tasks
> >> (again, simple notifier chain to get you to a predictably high performance level)
> >> and we're a long way better than we are today in terms of actual problems.
> >>
> >> For all the talk of ondemand (as ARM still uses that today)... that guy puts you in
> >> either the lowest or highest frequency over 95% of the time. Other non-cpufreq solutions
> >> like on Intel are bit more advanced (and will grow more so over time), but even there,
> >> in the grand scheme of things, the scheduler shouldn't have to care anymore with those
> >> two notifiers in place.
> >
> > You would need more than a few hints to implement more advanced capacity
> > management like proposed for the power scheduler. I believe that Intel
> > would benefit as well from guiding the scheduler to idle the right cpu
> > to enable deeper idle states and/or enable turbo-boost for other cpus.
> 
> that's an interesting theory.
> I've yet to see any way to actually have that do something useful.
> 
> yes there is some value in grouping a lot of very short tasks together.
> not a lot of value, but at least some.
> 
> and there is some value in the grouping within a package (to a degree) thing.
> 
> (both are basically "statistically, sort left" as policy)
> 

The proposed task packing patches have shown significant benefits for
scenarios with many short tasks. This is a typical scenario on android.

Morten



  reply	other threads:[~2013-06-21  8:50 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 13:47 [RFC] Comparison of power-efficient scheduling patch sets Morten Rasmussen
2013-05-31  1:17 ` Alex Shi
2013-05-31  8:23   ` Alex Shi
2013-05-31 10:52 ` power-efficient scheduling design Ingo Molnar
2013-06-03 14:59   ` Arjan van de Ven
2013-06-03 15:43     ` Ingo Molnar
2013-06-04 15:03   ` Morten Rasmussen
2013-06-07  6:26     ` Preeti U Murthy
2013-06-20 15:23     ` Ingo Molnar
2013-06-05  9:56   ` Amit Kucheria
2013-06-07  6:03   ` Preeti U Murthy
2013-06-07 14:51     ` Catalin Marinas
2013-06-07 18:08       ` Preeti U Murthy
2013-06-07 17:36         ` David Lang
2013-06-09  4:33           ` Preeti U Murthy
2013-06-08 11:28         ` Catalin Marinas
2013-06-08 14:02           ` Rafael J. Wysocki
2013-06-09  3:42             ` Preeti U Murthy
2013-06-09 22:53               ` Catalin Marinas
2013-06-10 16:25               ` Daniel Lezcano
2013-06-12  0:27                 ` David Lang
2013-06-12  1:48                   ` Arjan van de Ven
2013-06-12  9:48                     ` Amit Kucheria
2013-06-12 16:22                       ` David Lang
2013-06-12 10:20                     ` Catalin Marinas
2013-06-12 15:24                       ` Arjan van de Ven
2013-06-12 17:04                         ` Catalin Marinas
2013-06-12  9:50                   ` Daniel Lezcano
2013-06-12 16:30                     ` David Lang
2013-06-11  0:50               ` Rafael J. Wysocki
2013-06-13  4:32                 ` Preeti U Murthy
2013-06-09  4:23           ` Preeti U Murthy
2013-06-07 15:23     ` Arjan van de Ven
2013-06-14 16:05   ` Morten Rasmussen
2013-06-17 11:23     ` Catalin Marinas
2013-06-18  1:37     ` David Lang
2013-06-18 10:23       ` Morten Rasmussen
2013-06-18 17:39         ` David Lang
2013-06-19 12:39           ` Morten Rasmussen
2013-06-18 15:20     ` Arjan van de Ven
2013-06-18 17:47       ` David Lang
2013-06-18 19:36         ` Arjan van de Ven
2013-06-19 15:39         ` Arjan van de Ven
2013-06-19 17:00           ` Morten Rasmussen
2013-06-19 17:08             ` Arjan van de Ven
2013-06-21  8:50               ` Morten Rasmussen [this message]
2013-06-21 15:29                 ` Arjan van de Ven
2013-06-21 15:38                 ` Arjan van de Ven
2013-06-21 21:23                   ` Catalin Marinas
2013-06-21 21:34                     ` Arjan van de Ven
2013-06-23 23:32                       ` Benjamin Herrenschmidt
2013-06-24 10:07                         ` Catalin Marinas
2013-06-24 15:26                         ` Arjan van de Ven
2013-06-24 21:59                           ` Benjamin Herrenschmidt
2013-06-24 23:10                             ` Arjan van de Ven
2013-06-18 19:06       ` Catalin Marinas
2013-06-21 15:06       ` Morten Rasmussen
2013-06-23 10:55         ` Ingo Molnar

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=20130621085002.GJ5460@e103034-lin \
    --to=morten.rasmussen@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@intel.com \
    --cc=arjan@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=david@lang.hm \
    --cc=efault@gmx.de \
    --cc=len.brown@intel.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=preeti@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).