Skip to content

Commit b0d326d

Browse files
committed
Merge tag 'sched-urgent-2024-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fix from Ingo Molnar: "Fix a cpufreq related performance regression on certain systems, where the CPU would remain at the lowest frequency, degrading performance substantially" * tag 'sched-urgent-2024-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix frequency selection for non-invariant case
2 parents 8c94ccc + e37617c commit b0d326d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kernel/sched/cpufreq_schedutil.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy)
133133
if (arch_scale_freq_invariant())
134134
return policy->cpuinfo.max_freq;
135135

136-
return policy->cur;
136+
/*
137+
* Apply a 25% margin so that we select a higher frequency than
138+
* the current one before the CPU is fully busy:
139+
*/
140+
return policy->cur + (policy->cur >> 2);
137141
}
138142

139143
/**

0 commit comments

Comments
 (0)