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

Commit c200b5cf authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Matt Wagantall
Browse files

sched: don't inflate the task load when the CPU max freq is restricted



When the CPU max freq is restricted and the CPU is running at the
max freq, the task load is inflated by max_possible_freq/max_freq
factor. This results in tasks migrating early to the better capacity
CPUs which makes things worse if the frequency restriction is due
to the thermal condition.

Change-Id: Ie0ea405d7005764a6fb852914e88cf97102c138a
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 75f6d92a
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1282,9 +1282,7 @@ static inline u64 scale_exec_time(u64 delta, struct rq *rq)
	unsigned int cur_freq = rq->cur_freq;
	int sf;

	if (unlikely(cur_freq > max_possible_freq ||
		     (cur_freq == rq->max_freq &&
		      rq->max_freq < rq->max_possible_freq)))
	if (unlikely(cur_freq > max_possible_freq))
		cur_freq = rq->max_possible_freq;

	/* round up div64 */