Let me join the party here. Hope it's not too late ;)
On 12/07/2016 02:22 PM, Thara Gopinath wrote:
@@ -6063,10 +6094,16 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f && cpumask_test_cpu(cpu, tsk_cpus_allowed(p)); }
- if (energy_aware() && !(cpu_rq(prev_cpu)->rd->overutilized))
return select_energy_cpu_brute(p, prev_cpu);
- rcu_read_lock();
- sd = rcu_dereference(cpu_rq(prev_cpu)->sd);
- if (energy_aware() &&
!is_sd_overutilized(sd,
cpu_rq(cpu)->rd)) {
IMHO skipping EA task placement based on inner overutilized flag still can occur suboptimal placement when there is unavoidable load imbalance within a SD. For example say there is a 2+2 big.Little system and CPU0 and CPU1 are little CPUs. All other CPUs are idle but little CPU1 has a CPU bound task which makes little cluster's SD marked as overutilzed. Under the such condition any new wake-up of which the task's prev_cpu is either CPU0 or CPU1 will do non-EA placement. As a result small tasks can be on big CPU and also big task can be on little CPU (probably idle little CPU).
Overutilzed big CPUs' SD will have same issue for the tasks happened to be on a big CPU previously but better to be on a little CPU later.
What do you think? It can be tricky but it could be better to mark as overutilzed when all the CPUs in the SD are actually overutilzed for both task placement and lb.
new_cpu = select_energy_cpu_brute(p, prev_cpu);
goto unlock;
- }
- sd = NULL;
Leo, BTW where is the EAS repo I can publicly access to sync with your tip? I'm on google's lsk-v4.4-16.09-android tree and hope I can post my patches not too late but looks like there are quite dependencies.
Thanks, Joonwoo