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

Commit 76ef171c authored by Saravana Kannan's avatar Saravana Kannan
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>
parent 17a15f82
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -206,6 +206,8 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
	if (!sugov_should_update_freq(sg_policy, time))
		return;

	flags &= ~SCHED_CPUFREQ_RT_DL;

	if (flags & SCHED_CPUFREQ_RT_DL) {
		next_f = policy->cpuinfo.max_freq;
	} else {
@@ -278,6 +280,8 @@ static void sugov_update_shared(struct update_util_data *hook, u64 time,

	sugov_get_util(&util, &max);

	flags &= ~SCHED_CPUFREQ_RT_DL;

	raw_spin_lock(&sg_policy->update_lock);

	sg_cpu->util = util;