【操作系统百科】CFS 内部:vruntime 与红黑树
CFS(Completely Fair Scheduler)从 2.6.23 统治 Linux 18 年。本文讲它的核心数据结构:sched_entity、cfs_rq、按 vruntime 排序的红黑树;vruntime 随 nice 加权的公式;sched_latency_ns/min_granularity 如何决定周期;wake-up preemption、autogroup、group scheduling 的来龙去脉。
Linux 内核、存储与网络、可观测性、系统架构与大模型基础设施的工程笔记:机制拆解、踩坑复盘与可核对证据,少空谈。
共 1 篇文章 · 返回首页
CFS(Completely Fair Scheduler)从 2.6.23 统治 Linux 18 年。本文讲它的核心数据结构:sched_entity、cfs_rq、按 vruntime 排序的红黑树;vruntime 随 nice 加权的公式;sched_latency_ns/min_granularity 如何决定周期;wake-up preemption、autogroup、group scheduling 的来龙去脉。