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

Commit 060e1a87 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched/walt: Fix nr_eligible_big_tasks() for tri-cluster systems



nr_eligible_big_tasks() should return the number BIG tasks running
on the lowest capacity cluster. For higher capacity clusters, it
should return simply the number of runnable tasks. This assumption
is currently broken for tri-cluster systems. Fix it.

Change-Id: Ia451e965bf9c37ba181225c4beefbd77e6d1cead
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent a7f1b682
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -340,16 +340,16 @@ void sched_account_irqstart(int cpu, struct task_struct *curr, u64 wallclock)
}

/*
 * Return total number of tasks "eligible" to run on highest capacity cpu
 * Return total number of tasks "eligible" to run on higher capacity cpus
 *
 * This is simply nr_big_tasks for cpus which are not of max_capacity and
 * nr_running for cpus of max_capacity
 * This is simply nr_big_tasks for cpus which are of min_capacity and
 * nr_running for the other cpus.
 */
unsigned int nr_eligible_big_tasks(int cpu)
{
	struct rq *rq = cpu_rq(cpu);

	if (!is_max_capacity_cpu(cpu))
	if (is_min_capacity_cpu(cpu))
		return rq->walt_stats.nr_big_tasks;

	return rq->nr_running;