OSDN Git Service

sched: EAS/WALT: Don't take into account of running task's util
authorKe Wang <ke.wang@spreadtrum.com>
Thu, 9 Nov 2017 03:30:56 +0000 (11:30 +0800)
committerTodd Kjos <tkjos@google.com>
Wed, 13 Dec 2017 17:01:03 +0000 (17:01 +0000)
For upmigrating misfit running task case, the currently running
task's util has been counted into cpu_util(). Thus currently
__cpu_overutilized() which add task's uitl twice is overestimated.

Signed-off-by: Ke Wang <ke.wang@spreadtrum.com>
kernel/sched/fair.c

index b5ea66e..d9b3ac8 100644 (file)
@@ -6662,7 +6662,8 @@ static int select_energy_cpu_brute(struct task_struct *p, int prev_cpu, int sync
 
 
 #ifdef CONFIG_SCHED_WALT
-               if (!walt_disabled && sysctl_sched_use_walt_cpu_util)
+               if (!walt_disabled && sysctl_sched_use_walt_cpu_util &&
+                       p->state == TASK_WAKING)
                        delta = task_util(p);
 #endif
                /* Not enough spare capacity on previous cpu */