Imbalance detection and fairness in the CPU scheduler
Imbalance detection and fairness in the CPU scheduler
Posted May 23, 2020 17:18 UTC (Sat) by nivedita76 (subscriber, #121790)Parent article: Imbalance detection and fairness in the CPU scheduler
He presented an example to show how the calculations can vary. Imagine N tasks, all with the same utilization. If they all wake up simultaneously and land in the run queue together, the runnable_avg value that results will be proportional to N2. If, instead, each wakes up just as the previous one is completing the work, runnable_avg will be directly proportional to N. As N grows, the difference between the two scenarios will become large."
Maybe I'm missing something, but why is this a problem? If N tasks are ready to run, presumably we *want* them to migrate to other CPUs that might be able to run them right now? While if they're waking up one by one, there's no point in trying to migrate them away.