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

Commit b9131989 authored by Saravana Kannan's avatar Saravana Kannan Committed by Rohit Gupta
Browse files

cpufreq: schedutil: Don't jump to max frequency for RT tasks



Android uses a lot of RT threads. Jumping to max frequency for RT tasks
will cause a significant degradation in power that would not be acceptable
for mobile devices. So, stop doing that.

Change-Id: I4e1056c678755014e38eaafe05e890ff2e38c42e
Signed-off-by: default avatarSaravana Kannan <skannan@codeaurora.org>
Signed-off-by: default avatarRohit Gupta <rohgup@codeaurora.org>
parent 0682764e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -264,6 +264,7 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
	unsigned int next_f;
	bool busy;

	flags &= ~SCHED_CPUFREQ_RT_DL;
	sugov_set_iowait_boost(sg_cpu, time, flags);
	sg_cpu->last_update = time;

@@ -343,6 +344,8 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,

	sugov_get_util(&util, &max, sg_cpu->cpu);

	flags &= ~SCHED_CPUFREQ_RT_DL;

	raw_spin_lock(&sg_policy->update_lock);

	sg_cpu->util = util;