In order for the scheduler to be frequency invariant we measure the ratio between the maximum CPU frequency and the actual CPU frequency. During long tickless periods of time the calculations that keep track of that might overflow, in the function scale_freq_tick(): if (check_shl_overflow(acnt, 2*SCHED_CAPACITY_SHIFT, &acnt)) goto error; eventually forcing the kernel to disable the feature for all CPUs, and show the warning message: "Scheduler frequency invariance went wobbly, disabling!". Let's avoid that by limiting the frequency invariant calculations to CPUs with regular tick.
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -5504,7 +5504,9 @@ void scheduler_tick(void) · 5503 unmodified lines | |||
| 5504 | unsigned long thermal_pressure; | 5504 | unsigned long thermal_pressure; |
| 5505 | u64 resched_latency; | 5505 | u64 resched_latency; |
| 5506 | 5506 | ||
| 5507 | arch_scale_freq_tick(); | 5507 | if (housekeeping_cpu(cpu, HK_TYPE_TICK)) |
| 5508 | arch_scale_freq_tick(); | ||
| 5509 | |||
| 5508 | sched_clock_tick(); | 5510 | sched_clock_tick(); |
| 5509 | 5511 | ||
| 5510 | rq_lock(rq, &rf); | 5512 | rq_lock(rq, &rf); |