Skip to content

Commit d5881b6

Browse files
John Diasvbajs
authored andcommitted
cpufreq: schedutil: stop freq update when not changing
The sugov_update_commit path is proceeding with the normal path even when the frequency isn't actually changing. That has multiple bad results, including waking up sugov for no reason and updating the last frequency update-time when it hasn't actually changed (which can delay/inhibit future updates). Bug: 78144764 Change-Id: I252ca6de66507ade8820204f5c8f8959f12714f7 Signed-off-by: John Dias <joaodias@google.com> Signed-off-by: onettboots <blackcocopet@gmail.com> Signed-off-by: Yahya Wessam <yahyawessam2002@gmail.com>
1 parent d0486ea commit d5881b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/sched/cpufreq_schedutil.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ static void sugov_update_commit(struct sugov_policy *sg_policy, u64 time,
167167
return;
168168
}
169169

170+
if (sg_policy->next_freq == next_freq)
171+
return;
172+
170173
sg_policy->next_freq = next_freq;
171174
sg_policy->last_freq_update_time = time;
172175

0 commit comments

Comments
 (0)