阅读背景:

linux CFS调度器如何防止一个vruntime非常小的任务使处理器挨饿?

来源:互联网 

So after a task eats up its time slice, it would be re-inserted into the red-black tree. If the task has slept for a long time previously , leading to a very small vruntime compared to other tasks in the runqueue, then it will be repetitively re-inserted as the left-most node in the red-black tree, right? Consequently it will always be picked up as the next task to run? I have checked the source code in core.c and fair.c, I didn't see any place where this task should yield to other tasks. Though in the funciton pick_next_entity(), I do see some tasks such cfs_rq->next,cfs_rq->last or etc.. which might have higher running priority,I do not think this is the correct place to prevent a task with very small vruntime from taking a processor for a too long time,right? Does anyone have a clue? Thanks,So after a task eats up its time slice, it woul




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: