Messages in this thread | | | Subject | Re: [PATCH v2 1/2] sched/fair: Only compute base_energy_pd if necessary | From | Lukasz Luba <> | Date | Fri, 30 Apr 2021 12:03:56 +0100 |
| |
Hi Pierre,
On 4/29/21 11:19 AM, Pierre.Gondois@arm.com wrote: > From: Pierre Gondois <Pierre.Gondois@arm.com> > > find_energy_efficient_cpu() searches the best energy CPU > to place a task on. To do so, the energy of each performance domain > (pd) is computed w/ and w/o the task placed in each pd. > > The energy of a pd w/o the task (base_energy_pd) is computed prior > knowing whether a CPU is available in the pd. > > Move the base_energy_pd computation after looping through the CPUs > of a pd and only computes it if at least one CPU is available. > > Suggested-by: Xuewen Yan <xuewen.yan@unisoc.com> > Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> > --- > kernel/sched/fair.c | 38 ++++++++++++++++++++++---------------- > 1 file changed, 22 insertions(+), 16 deletions(-) >
Make sense. I will speed-up feec() on Android devices for tasks being moved into 'background' cgroup (limited to subset of CPUs, e.g. to only Little cores). LGTM.
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Regards, Lukasz
| |