On 23-Jun 21:43, Leo Yan wrote:
Prefer to select idle CPU to place waken up task. So we can see the task can be more stable to spread to CPUs in the cluster and hope can decrease OPP for power saving.
In general I think it's worth to have these comments in the code as well, right over the IF condition you are modifying...
Signed-off-by: Leo Yan leo.yan@linaro.org
kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c4bc7ae..7bd1c5b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5617,7 +5617,7 @@ static int energy_aware_wake_cpu(struct task_struct *p, int target)
if (new_util < capacity_curr_of(i)) { target_cpu = i;
if (cpu_rq(i)->nr_running)
if (!cpu_rq(i)->nr_running)
Maybe we should link this change with a check on boosted value? It could make sense to use a spread strategy only for boosted tasks, where waking up a task on an idle CPU can have a positive effect on its time to completion.
break; }
-- 1.9.1
-- #include <best/regards.h>
Patrick Bellasi