|
|
Subscribe / Log in / New account

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

"Another issue relates to the threshold used with runnable_avg; it is currently a fixed value. But runnable_avg is dependent on the number of runnable tasks, since more tasks will lead to more waiting time. That makes it easier to cross the threshold as the number of tasks increases.

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.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds