【Linux 排程機制】從 CFS 到 EEVDF:虛擬截止時間如何給 Linux 排程帶來延遲保證 / [Linux Scheduling] From CFS to EEVDF: How Earliest Eligible Virtual Deadline First Brings Latency Guarantees to Linux
你有沒有遇過這種情況:開著幾個重度應用,滑鼠游標明明沒動,系統卻突然停頓半秒,播放的影片掉幀、遊戲瞬間卡住?這往往不是記憶體不足,而是「排程延遲」——核心決定哪個進程下次使用 CPU 的時間點,沒有給即時工作負載足夠的保證。舊版 Linux 預設排程器 CFS(完全公平排程)追求整體公平,但對「這個任務必須在多久內執行」的延遲上限,缺乏明確承諾。 Have you ever experienced this: several heavy applications running, the mouse cursor sits still, yet the system suddenly freezes for half a second, video stutters, or a game hitches? This is often not memory exhaustion, but "scheduling latency" — the kernel's decision of which process gets the CPU next fails to guarantee timing for latency-sensitive workloads. The default Linux scheduler CFS (Completely Fair Scheduler) pursues overall fairness, but lacks a clear upper-bound commitment on "this task must run within how long." struct sched_entity (排程實體) Linux 6.18.55 · kernel/sched/fair.c · include/linux/sched.h EEVDF 決策欄位 load struct load_weight — 加權負載,決定分攤時間比例 run_node struct rb_node — 掛在 CFS 紅黑樹 tasks_timeline 上的節點 vrun...