sched_ext
sched_ext is an eBPF-based extensible scheduling framework in the Linux kernel (merged upstream in v6.12) that lets you implement a custom CPU scheduler as a safe BPF program loaded from user space, instead of patching the kernel’s built-in scheduler. It is ebpf‘s “programmability decoupled from the kernel release cycle” thesis reaching the scheduler — the most performance-sensitive core the kernel has. Co-designed by Meta and the authors of Google’s ghOSt.
What it enables
A scheduler policy attaches through the same ebpf machinery — event-driven callbacks (thread wake-up, enqueue, dispatch, idle transitions), the verifier proving the code is safe to run in-kernel, and maps sharing state with user space. Because the policy is a user-space binary loading a BPF program, iterating means restarting a process, not rebuilding/reinstalling a kernel (meta-sched-ext-ads) — turning scheduler tuning into a fast deploy-measure loop. Policies can encode domain-specific knowledge the generic kernel scheduler can’t have (e.g. which threads are latency-critical), the way Meta’s ads-fleet policy soft-partitions CPUs into latency-critical vs. best-effort pools.
Where it sits in the spoke
It’s a fourth application domain for ebpf — beyond observability, networking, and security (ebpf) — namely scheduling, and the clearest case yet that eBPF is a general kernel-programmability substrate, not only a telemetry one. It makes kernel-level CPU scheduling a lever in the platform-ops toolkit: domain-aware scheduling moves production SLIs (tail latency, throughput) and energy at fleet scale, while the eBPF verifier supplies the safety the “untrusted code in the kernel” bargain needs. It shares the same kernel-version-currency constraint eBPF carries (a v6.12+ feature). Conceptually it’s the kernel-level cousin of the scheduling lessons in scaling-to-1m-lambda (scheduling as a production efficiency/hazard lever, there at the serverless-fleet layer).
Related
ebpf · meta-sched-ext-ads · site-reliability-engineering · service-level-objectives · scaling-to-1m-lambda · platform-ops