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

Commit 649af694 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched: walt: select sysctl_sched_is_big_little dynamically



If the energy model indicates that there is an overlap between
the clusters, set sysctl_sched_is_big_little to 0.

Change-Id: Iaf633a69809f325120e7a77ae0747f42deb6ae7f
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent c5927f1c
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -2178,8 +2178,32 @@ static void sort_clusters(void)

void walt_sched_energy_populated_callback(void)
{
	struct sched_cluster *cluster;
	int prev_max = 0;

	mutex_lock(&cluster_lock);

	if (num_clusters == 1) {
		sysctl_sched_is_big_little = 0;
		mutex_unlock(&cluster_lock);
		return;
	}

	sort_clusters();

	for_each_sched_cluster(cluster) {
		if (cluster->min_power_cost > prev_max) {
			prev_max = cluster->max_power_cost;
			continue;
		}
		/*
		 * We assume no overlap in the power curves of
		 * clusters on a big.LITTLE system.
		 */
		sysctl_sched_is_big_little = 0;
		break;
	}

	mutex_unlock(&cluster_lock);
}