From: Catalin Marinas <catalin.marinas@arm.com>
To: Morten Rasmussen <Morten.Rasmussen@arm.com>
Cc: 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>,
"arjan@linux.intel.com" <arjan@linux.intel.com>,
"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>
Subject: Re: power-efficient scheduling design
Date: Mon, 17 Jun 2013 12:23:12 +0100 [thread overview]
Message-ID: <20130617112312.GC22090@arm.com> (raw)
In-Reply-To: <20130614160522.GG32728@e103034-lin>
On Fri, Jun 14, 2013 at 05:05:22PM +0100, Morten Rasmussen wrote:
> The intention is that the power scheduler will implement the (unified)
> power policy. It gets the current load of the system from the scheduler.
> Based on this information it will adjust the compute capacity available
> to the scheduler and drive frequency changes such that enough compute
> capacity is available to handle the current load. If the total load can
> be handled by a subset of cpus, it will reduce the capacity of the
> excess cpus to 0 (cpu_power=1). Likewise, if the load increases it will
> increase capacity of one or more idle cpus to allow the scheduler to
> spread the load. The power scheduler has knowledge about the power
> topology and will guide the scheduler to idle the most optimum cpus by
> reducing its capacity. Global idle decision will be handled by the power
> scheduler, so cpuidle can over time be reduced to become just a driver,
> once we have added C-state selection to the power scheduler.
>
> The scheduler is left to focus on scheduling mechanics and finding the
> best possible load balance on the cpu capacities set by the power
> scheduler. It will share a detailed view of the current load with the
> power scheduler to enable it to make the right capacity adjustments. The
> scheduler will need some optimization to cope better with asymmetric
> compute capacities. We may want to reduce capacity of some cpu to
> increase their idle time while letting others take the majority of the
> load.
...
> I'm aware that the scheduler and power scheduler decisions may be
> inextricably linked so we may decide to merge them. However, I think it
> is worth trying to keep the power scheduling decisions out of the
> scheduler until we have proven it infeasible.
Thanks for posting this, I agree with the proposal. I would like to
emphasise that this is a rather "divide and conquer" approach to
reaching a unified solution. Some of the steps involved (not necessarily
in this order):
1. Introduction of a power scheduler (replacing cpufreq governor) aware
of the overall load and CPU capacities. It requests CPU frequency
changes from the low-level cpufreq driver and gives hints to the task
scheduler about load asymmetry (via cpu_power).
2. More accurate task load tracking (an attempt here -
https://lkml.org/lkml/2013/4/16/289 - but possibly better accuracy
using CPU cycles or other arch-specific counters).
3. Load balancer improvements for asymmetric CPU performance levels
(e.g. frequency scaling).
4. Power scheduler driving the CPU idle decisions (replacing the cpuidle
governor).
5. Power scheduler increased awareness of the run-queues content
(number of tasks, individual task loads) and load balancer behaviour,
feeding extra hints back to the load balancer (e.g. only move tasks
below/above certain load, trigger a load balance).
6. Performance vs power saving tuning (policies).
7. More specific optimisations based on the CPU topology (big.little,
turbo boost, etc.)
?. Lots of other things based on testing and community reviews.
Step 5 above will further increase the coupling between load balancer
and power scheduler and we could end up with a unified implementation.
But before then it is simpler to reason in terms of (a) better load
balancing in an asymmetric configuration and (b) CPU capacity needed for
the overall load.
--
Catalin
next prev parent reply other threads:[~2013-06-17 11:24 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 [this message]
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
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=20130617112312.GC22090@arm.com \
--to=catalin.marinas@arm.com \
--cc=Morten.Rasmussen@arm.com \
--cc=akpm@linux-foundation.org \
--cc=alex.shi@intel.com \
--cc=arjan@linux.intel.com \
--cc=corbet@lwn.net \
--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 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.