COSCUP 2025

藉由 sched_ext 實作客製化 Linux CPU 排程器

"I'm also not a believer in the argument that has been used (multiple times) that the BPF scheduler would keep people from participating in scheduler development." - Linus Torvalds

Linux v6.12 引入的 sched_ext (scx) 允許開發者藉由 eBPF,在使用者空間動態載入或抽換 CPU 排程器。本議程嘗試結合機器學習,利用 BPF map 彙整 CPU 排程相關事件資料,依據推論動態調整 time slice、CPU affinity 與 task migration。預計探討以下:

  • 回顧 CFS/EEVDF
  • sched_ext 的創新和相關機制
  • 從客製化的 FCFS/RR 排程器到機器學習,並引入負載預測機制

Zielpublikum:

關注於 Linux 核心最新技術者,特別是想知道 Meta 和 Google 一類公司為何投入 sched_ext (scx) 發展,以及客製化的 CPU 排程器能夠解決什麼問題。For those interested in the latest Linux kernel technologies—especially those curious about why companies like Meta and Google are investing in the development of sched_ext (scx) and what problems custom CPU schedulers aim to solve.

Schwierigkeitsgrad:

初學者

Siehe auch: