Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-04-28 Thread Peter Zijlstra
On Mon, Apr 27, 2015 at 09:01:13AM -0700, Michael Turquette wrote: Quoting Peter Zijlstra (2015-03-26 03:41:50) On Thu, Mar 26, 2015 at 10:21:24AM +, Juri Lelli wrote: - what about other sched classes? I know that this is very premature, but I can help but thinking that we'll need

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-04-27 Thread Michael Turquette
Quoting Peter Zijlstra (2015-03-26 03:41:50) On Thu, Mar 26, 2015 at 10:21:24AM +, Juri Lelli wrote: - what about other sched classes? I know that this is very premature, but I can help but thinking that we'll need to do some sort of aggregation of requests, and if we put

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-27 Thread Morten Rasmussen
On Wed, Mar 18, 2015 at 08:15:59PM +, Sai Gurrappadi wrote: On 03/16/2015 07:47 AM, Morten Rasmussen wrote: Again you are right. We could make the + task_utilization(p) conditional on i != task_cpu(p). One argument against doing that is that in select_task_rq_fair() task_utilization(p)

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-26 Thread Juri Lelli
On 25/03/15 18:14, Peter Zijlstra wrote: On Wed, Mar 25, 2015 at 06:01:22PM +, Juri Lelli wrote: Yes and no, IMHO. It makes perfect sense to trigger cpufreq on the target_cpu's freq domain, as we know that we are going to add p's utilization there. Fair point; I mainly wanted to start

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-26 Thread Peter Zijlstra
On Thu, Mar 26, 2015 at 10:21:24AM +, Juri Lelli wrote: - what about other sched classes? I know that this is very premature, but I can help but thinking that we'll need to do some sort of aggregation of requests, and if we put triggers in very specialized points we might lose

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-25 Thread Juri Lelli
Hi Peter, On 24/03/15 16:35, Peter Zijlstra wrote: On Wed, Feb 04, 2015 at 06:31:10PM +, Morten Rasmussen wrote: +static int energy_aware_wake_cpu(struct task_struct *p) +{ +struct sched_domain *sd; +struct sched_group *sg, *sg_target; +int target_max_cap =

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-25 Thread Peter Zijlstra
On Wed, Mar 25, 2015 at 06:01:22PM +, Juri Lelli wrote: Yes and no, IMHO. It makes perfect sense to trigger cpufreq on the target_cpu's freq domain, as we know that we are going to add p's utilization there. Fair point; I mainly wanted to start this discussion so that seems to have been a

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-24 Thread Peter Zijlstra
On Wed, Feb 04, 2015 at 06:31:10PM +, Morten Rasmussen wrote: @@ -5138,6 +5224,10 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f prev_cpu = cpu; if (sd_flag SD_BALANCE_WAKE) { + if (energy_aware()) { +

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-24 Thread Peter Zijlstra
On Mon, Mar 16, 2015 at 02:47:23PM +, Morten Rasmussen wrote: Also, this heuristic for determining sg_target is a big little assumption. I don't think it is necessarily correct to assume that this is true for all platforms. This heuristic should be derived from the energy model for the

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-24 Thread Morten Rasmussen
On Tue, Mar 24, 2015 at 01:00:58PM +, Peter Zijlstra wrote: On Wed, Feb 04, 2015 at 06:31:10PM +, Morten Rasmussen wrote: @@ -5138,6 +5224,10 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f prev_cpu = cpu; if (sd_flag

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-24 Thread Morten Rasmussen
On Tue, Mar 24, 2015 at 01:00:00PM +, Peter Zijlstra wrote: On Mon, Mar 16, 2015 at 02:47:23PM +, Morten Rasmussen wrote: Also, this heuristic for determining sg_target is a big little assumption. I don't think it is necessarily correct to assume that this is true for all

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-24 Thread Peter Zijlstra
On Tue, Mar 24, 2015 at 03:42:42PM +, Morten Rasmussen wrote: Right, I agree that we should preferably do the normal thing for U ~= 1. We can restructure the wake-up path to follow that pattern, but we need to know U beforehand to choose the right path. U isn't just get_cpu_usage(prev_cpu)

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-24 Thread Peter Zijlstra
On Wed, Feb 04, 2015 at 06:31:10PM +, Morten Rasmussen wrote: +static int energy_aware_wake_cpu(struct task_struct *p) +{ + struct sched_domain *sd; + struct sched_group *sg, *sg_target; + int target_max_cap = SCHED_CAPACITY_SCALE; + int target_cpu = task_cpu(p); +

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-24 Thread Morten Rasmussen
On Tue, Mar 24, 2015 at 03:53:52PM +, Peter Zijlstra wrote: On Tue, Mar 24, 2015 at 03:42:42PM +, Morten Rasmussen wrote: Right, I agree that we should preferably do the normal thing for U ~= 1. We can restructure the wake-up path to follow that pattern, but we need to know U

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-18 Thread Sai Gurrappadi
On 03/16/2015 07:47 AM, Morten Rasmussen wrote: On Fri, Mar 13, 2015 at 10:47:16PM +, Sai Gurrappadi wrote: On 02/04/2015 10:31 AM, Morten Rasmussen wrote: +static int energy_aware_wake_cpu(struct task_struct *p) +{ + struct sched_domain *sd; + struct sched_group *sg, *sg_target; +

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-16 Thread Morten Rasmussen
On Fri, Mar 13, 2015 at 10:47:16PM +, Sai Gurrappadi wrote: On 02/04/2015 10:31 AM, Morten Rasmussen wrote: +static int energy_aware_wake_cpu(struct task_struct *p) +{ + struct sched_domain *sd; + struct sched_group *sg, *sg_target; + int target_max_cap = SCHED_CAPACITY_SCALE;

Re: [RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-03-13 Thread Sai Gurrappadi
On 02/04/2015 10:31 AM, Morten Rasmussen wrote: Let available compute capacity and estimated energy impact select wake-up target cpu when energy-aware scheduling is enabled. energy_aware_wake_cpu() attempts to find group of cpus with sufficient compute capacity to accommodate the task and find

[RFCv3 PATCH 33/48] sched: Energy-aware wake-up task placement

2015-02-04 Thread Morten Rasmussen
Let available compute capacity and estimated energy impact select wake-up target cpu when energy-aware scheduling is enabled. energy_aware_wake_cpu() attempts to find group of cpus with sufficient compute capacity to accommodate the task and find a cpu with enough spare capacity to handle the task