Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 827a31c6 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Gerrit - the friendly Code Review server
Browse files

sched: set LBF_IGNORE_PREFERRED_CLUSTER_TASKS correctly



The LBF_IGNORE_PREFERRED_CLUSTER_TASKS flag needs to be set
for all types of inter-cluster load balance. Currently this
is set only when higher capacity CPU is pulling the tasks from
a lower capacity CPU. This can result in the migration of grouped
tasks from higher capacity cluster to lower capacity cluster.

Change-Id: Ib0476c5c85781804798ef49268e1b193859ff5ef
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 314869eb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -7940,10 +7940,11 @@ static int detach_tasks(struct lb_env *env)
	if (env->imbalance <= 0)
		return 0;

	if (!same_cluster(env->dst_cpu, env->src_cpu))
		env->flags |= LBF_IGNORE_PREFERRED_CLUSTER_TASKS;

	if (cpu_capacity(env->dst_cpu) < cpu_capacity(env->src_cpu))
		env->flags |= LBF_IGNORE_BIG_TASKS;
	else if (!same_cluster(env->dst_cpu, env->src_cpu))
		env->flags |= LBF_IGNORE_PREFERRED_CLUSTER_TASKS;

redo:
	while (!list_empty(tasks)) {