How Tech - Systems Programming

How Tech - Systems Programming

Implementing a BPF Extensible Scheduler with sched_ext

May 30, 2026
∙ Paid

Prerequisites


Part I — The Scheduler You Never Got to Touch


The Linux scheduler has always been a black box you configure around, not something you replace. CFS gives you nice values, cgroup weights, and CPU affinity — but the actual scheduling policy, the decision about which task runs next on which CPU, has been kernel-only territory since the beginning. That changed with Linux 6.12.

sched_ext (BPF extensible scheduler) lets you implement a custom scheduling class in BPF. Not a hint. Not a tunable. The actual policy — which task gets the CPU, for how long, on which core. You write BPF programs that the kernel calls at every scheduling decision point. If your BPF program crashes, the kernel falls back to CFS automatically. No reboot, no panic.


User's avatar

Continue reading this post for free, courtesy of Systems.

Or purchase a paid subscription.
© 2026 Sumedh S · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture