Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-18 Thread Quentin Perret
Hi Leo, On Tuesday 17 Apr 2018 at 23:39:44 (+0800), Leo Yan wrote: > > + for_each_freq_domain(fd) { > > + unsigned long spare_cap, max_spare_cap = 0; > > + int max_spare_cap_cpu = -1; > > + unsigned long util; > > + > > + /* Find the CPU with the max

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-18 Thread Quentin Perret
Hi Leo, On Tuesday 17 Apr 2018 at 23:39:44 (+0800), Leo Yan wrote: > > + for_each_freq_domain(fd) { > > + unsigned long spare_cap, max_spare_cap = 0; > > + int max_spare_cap_cpu = -1; > > + unsigned long util; > > + > > + /* Find the CPU with the max

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-17 Thread Leo Yan
On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > From: Quentin Perret > > In case an energy model is available, waking tasks are re-routed into a > new energy-aware placement algorithm. The eligible CPUs to be used in the > energy-aware wakeup path are

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-17 Thread Leo Yan
On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > From: Quentin Perret > > In case an energy model is available, waking tasks are re-routed into a > new energy-aware placement algorithm. The eligible CPUs to be used in the > energy-aware wakeup path are restricted to the

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-10 Thread Quentin Perret
On Tuesday 10 Apr 2018 at 19:29:32 (+0200), Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > > + for_each_freq_domain(fd) { > > + unsigned long spare_cap, max_spare_cap = 0; > > + int max_spare_cap_cpu = -1; > > + unsigned

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-10 Thread Quentin Perret
On Tuesday 10 Apr 2018 at 19:29:32 (+0200), Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > > + for_each_freq_domain(fd) { > > + unsigned long spare_cap, max_spare_cap = 0; > > + int max_spare_cap_cpu = -1; > > + unsigned

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-10 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > + for_each_freq_domain(fd) { > + unsigned long spare_cap, max_spare_cap = 0; > + int max_spare_cap_cpu = -1; > + unsigned long util; > + > + /* Find the CPU with the max spare

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-10 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > + for_each_freq_domain(fd) { > + unsigned long spare_cap, max_spare_cap = 0; > + int max_spare_cap_cpu = -1; > + unsigned long util; > + > + /* Find the CPU with the max spare

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-09 Thread Quentin Perret
On Monday 09 Apr 2018 at 18:30:29 (+0200), Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > > if (sd_flag & SD_BALANCE_WAKE) { > > record_wakee(p); > > + want_energy = wake_energy(p, prev_cpu); > > want_affine =

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-09 Thread Quentin Perret
On Monday 09 Apr 2018 at 18:30:29 (+0200), Peter Zijlstra wrote: > On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > > if (sd_flag & SD_BALANCE_WAKE) { > > record_wakee(p); > > + want_energy = wake_energy(p, prev_cpu); > > want_affine =

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-09 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > if (sd_flag & SD_BALANCE_WAKE) { > record_wakee(p); > + want_energy = wake_energy(p, prev_cpu); > want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) > -

Re: [RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-09 Thread Peter Zijlstra
On Fri, Apr 06, 2018 at 04:36:06PM +0100, Dietmar Eggemann wrote: > if (sd_flag & SD_BALANCE_WAKE) { > record_wakee(p); > + want_energy = wake_energy(p, prev_cpu); > want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) > -

[RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-06 Thread Dietmar Eggemann
From: Quentin Perret In case an energy model is available, waking tasks are re-routed into a new energy-aware placement algorithm. The eligible CPUs to be used in the energy-aware wakeup path are restricted to the highest non-overutilized sched_domain containing prev_cpu

[RFC PATCH v2 5/6] sched/fair: Select an energy-efficient CPU on task wake-up

2018-04-06 Thread Dietmar Eggemann
From: Quentin Perret In case an energy model is available, waking tasks are re-routed into a new energy-aware placement algorithm. The eligible CPUs to be used in the energy-aware wakeup path are restricted to the highest non-overutilized sched_domain containing prev_cpu and this_cpu. If no such