GitHub repo: https://github.com/firelzrd/bore-scheduler
BORE 排程器著重在透過犧牲些許 fairness 來換取較低的 interactive task 的 scheduling latency。此外,其建構在 CFS 之上,並只對更新 vruntime 的程式碼做調整,整體改動相對其他非官方 CPU 排程器 (例如:CacULE, TT, Baby, Project C, MuQSS ^本文最下方提供相關超連結^) 可以說是相當小。
burst time 機制
BORE 在 sched_entity 結構體中加入一名為 burst_time 的成員,用於紀錄給定 schedule entity 總共的 CPU time (實際使用 CPU 的時間),並輔助 burst score (用於取得 task 權重值的 index) 的計算,burst score 越高 (使用越多 CPU 時間),代表 task 越不可能是 interactive task,因此 vruntime 增加的幅度就越大,以使得 interactive task 有較好的 scheduling latency 表現:
@@ -885,6 +897,19 @@ static void update_curr(struct cfs_rq *cfs_rq)
curr->sum_exec_runtime += delta_exec;
schedstat_add(cfs_rq->exec_clock, delta_exec);