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

Commit 4cb51ad4 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Satya Durga Srinivasu Prabhala
Browse files

sched/fair: Update overutilized status after migrating tasks



The enqueue_task_fair updates the overutilized status only for
waking tasks. Since multiple tasks may get migrated during the
load balancer, update the overutilized status after migrating
all tasks.

Change-Id: I2163ba8dcb7eb9677f609d19e3579867e4dff1b1
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent c5db4b9c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -8578,6 +8578,7 @@ static void attach_one_task(struct rq *rq, struct task_struct *p)
	rq_lock(rq, &rf);
	update_rq_clock(rq);
	attach_task(rq, p);
	update_overutilized_status(rq);
	rq_unlock(rq, &rf);
}

@@ -8601,6 +8602,13 @@ static void attach_tasks(struct lb_env *env)
		attach_task(env->dst_rq, p);
	}

	/*
	 * The enqueue_task_fair only updates the overutilized status
	 * for the waking tasks. Since multiple tasks may get migrated
	 * from load balancer, instead of doing it there, update the
	 * overutilized status here at the end.
	 */
	update_overutilized_status(env->dst_rq);
	rq_unlock(env->dst_rq, &rf);
}