Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Peter Zijlstra
On Thu, Oct 04, 2018 at 11:55:09AM +0100, Quentin Perret wrote: > On Thursday 04 Oct 2018 at 12:41:07 (+0200), Peter Zijlstra wrote: > > Not sure, see what it looks like ;-) My main concern here was to get rid > > of that giant blob in select_task_rq_fair(). > > OK, got it. I'll probably just

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Peter Zijlstra
On Thu, Oct 04, 2018 at 11:55:09AM +0100, Quentin Perret wrote: > On Thursday 04 Oct 2018 at 12:41:07 (+0200), Peter Zijlstra wrote: > > Not sure, see what it looks like ;-) My main concern here was to get rid > > of that giant blob in select_task_rq_fair(). > > OK, got it. I'll probably just

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Quentin Perret
On Thursday 04 Oct 2018 at 12:41:07 (+0200), Peter Zijlstra wrote: > Not sure, see what it looks like ;-) My main concern here was to get rid > of that giant blob in select_task_rq_fair(). OK, got it. I'll probably just move the checks into the function and merge that large comment into the

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Quentin Perret
On Thursday 04 Oct 2018 at 12:41:07 (+0200), Peter Zijlstra wrote: > Not sure, see what it looks like ;-) My main concern here was to get rid > of that giant blob in select_task_rq_fair(). OK, got it. I'll probably just move the checks into the function and merge that large comment into the

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Peter Zijlstra
On Thu, Oct 04, 2018 at 11:27:22AM +0100, Quentin Perret wrote: > > > + for_each_cpu_and(cpu, perf_domain_span(pd), > > > sched_domain_span(sd)) { > > > > Which of the two masks do we expect to be the smallest? > > Typically, perf_domain_span is smaller. OK, then the above expression

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Peter Zijlstra
On Thu, Oct 04, 2018 at 11:27:22AM +0100, Quentin Perret wrote: > > > + for_each_cpu_and(cpu, perf_domain_span(pd), > > > sched_domain_span(sd)) { > > > > Which of the two masks do we expect to be the smallest? > > Typically, perf_domain_span is smaller. OK, then the above expression

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Quentin Perret
On Thursday 04 Oct 2018 at 11:44:12 (+0200), Peter Zijlstra wrote: > On Wed, Sep 12, 2018 at 10:13:07AM +0100, Quentin Perret wrote: > > + while (pd) { > > + unsigned long cur_energy, spare_cap, max_spare_cap = 0; > > + int max_spare_cap_cpu = -1; > > + > > +

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Quentin Perret
On Thursday 04 Oct 2018 at 11:44:12 (+0200), Peter Zijlstra wrote: > On Wed, Sep 12, 2018 at 10:13:07AM +0100, Quentin Perret wrote: > > + while (pd) { > > + unsigned long cur_energy, spare_cap, max_spare_cap = 0; > > + int max_spare_cap_cpu = -1; > > + > > +

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Peter Zijlstra
On Wed, Sep 12, 2018 at 10:13:07AM +0100, Quentin Perret wrote: > + while (pd) { > + unsigned long cur_energy, spare_cap, max_spare_cap = 0; > + int max_spare_cap_cpu = -1; > + > + for_each_cpu_and(cpu, perf_domain_span(pd), > sched_domain_span(sd)) {

Re: [PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-10-04 Thread Peter Zijlstra
On Wed, Sep 12, 2018 at 10:13:07AM +0100, Quentin Perret wrote: > + while (pd) { > + unsigned long cur_energy, spare_cap, max_spare_cap = 0; > + int max_spare_cap_cpu = -1; > + > + for_each_cpu_and(cpu, perf_domain_span(pd), > sched_domain_span(sd)) {

[PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-09-12 Thread Quentin Perret
If an Energy Model (EM) is available and if the system isn't overutilized, re-route waking tasks into an energy-aware placement algorithm. The selection of an energy-efficient CPU for a task is achieved by estimating the impact on system-level active energy resulting from the placement of the task

[PATCH v7 12/14] sched/fair: Select an energy-efficient CPU on task wake-up

2018-09-12 Thread Quentin Perret
If an Energy Model (EM) is available and if the system isn't overutilized, re-route waking tasks into an energy-aware placement algorithm. The selection of an energy-efficient CPU for a task is achieved by estimating the impact on system-level active energy resulting from the placement of the task