当前位置:网站首页>Preemption of CFS scheduling

Preemption of CFS scheduling

2022-07-05 06:38:00 techtitan

Conclusion analysis

  1. No way policy Can be preempted , such as sched_normal policy You can seize sched_idle policy The task of . sched_batch Don't take
  2. Wake up task and fantasy task when waking up , If two features next_buddy as well as last_buddy If it is opened , It can support preemption
  3. If wakeup Mission vruntime Time is less than curr Of vruntime Time , The difference is greater than sysctl_sched_wakeup_granularity, Is set next_buddy (set_next_buddy)

# Functions involved
check_preempt_wakeup May be set NEXT_BUDDY and LAST_BUDDY, cfs_rq There are next and last The pointer , Support preemption
place_entity ( The sleep process and the newly created process will be allocated vruntime Time slice )
pick_next_entity

Main function analysis

原网站

版权声明
本文为[techtitan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140601220647.html