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

Commit 434939ed authored by Syed Rameez Mustafa's avatar Syed Rameez Mustafa
Browse files

sched/hmp: Use improved information for frequency notifications



Recent changes to scheduler guided frequency have started reporting
the maximum of the cpu load and the load of the top task on a CPU
to the governor. Use the same information to determine whether a
notification is necessary or not.

Change-Id: I1928c6cd0509952443a912ef54e0d72d5f75955d
Signed-off-by: default avatarSyed Rameez Mustafa <rameezmustafa@codeaurora.org>
parent f82935d5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1789,6 +1789,7 @@ static void group_load_in_freq_domain(struct cpumask *cpus,
	}
}

static inline u64 freq_policy_load(struct rq *rq, u64 load);
/*
 * Should scheduler alert governor for changing frequency?
 *
@@ -1836,6 +1837,7 @@ static int send_notification(struct rq *rq, int check_pred, int check_groups)
			_group_load_in_cpu(cpu_of(rq), &group_load, NULL);

		new_load = rq->prev_runnable_sum + group_load;
		new_load = freq_policy_load(rq, new_load);

		raw_spin_unlock_irqrestore(&rq->lock, flags);
		read_unlock(&related_thread_group_lock);
@@ -3310,7 +3312,7 @@ void sched_get_cpus_busy(struct sched_load *busy,
				 0);

		account_load_subtractions(rq);
		load[i] = rq->old_busy_time = rq->prev_runnable_sum;
		load[i] = rq->prev_runnable_sum;
		nload[i] = rq->nt_prev_runnable_sum;
		pload[i] = rq->hmp_stats.pred_demands_sum;
		rq->old_estimated_time = pload[i];
@@ -3373,6 +3375,8 @@ void sched_get_cpus_busy(struct sched_load *busy,
		nload[i] += ngload[i];

		load[i] = freq_policy_load(rq, load[i]);
		rq->old_busy_time = load[i];

		/*
		 * Scale load in reference to cluster max_possible_freq.
		 *