CONCEPT Cited by 1 source
BPF-extensible scheduling¶
Definition¶
BPF-extensible scheduling is the architectural pattern of implementing CPU scheduling logic as verified BPF programs that the kernel invokes at scheduling decision points. The BPF verifier guarantees safety (no infinite loops, no invalid memory access); the kernel provides the hooks (wake-up, enqueue, dispatch, idle); the policy author provides the intelligence.
This is a specific instance of the broader BPF extensibility model (the same model that powers eBPF-based profiling, networking, and security) applied to the scheduling subsystem.
Key properties¶
- Kernel-native performance: BPF programs run in kernel context with JIT compilation — no context-switch overhead to user space.
- Verifier-guaranteed safety: The BPF verifier ensures the scheduling policy cannot crash the kernel or violate memory safety.
- User-space lifecycle: The policy binary lives in user space; load/unload/restart without kernel rebuild or reboot.
- Event-driven callbacks: The kernel invokes the BPF scheduler at well-defined scheduling events (thread wake-up, enqueue, dispatch, idle transitions).
Canonical implementation¶
systems/sched-ext (Linux v6.12) is the canonical upstream implementation. Co-developed by Meta and Google (ghOSt team, SOSP 2021).
See also¶
- systems/sched-ext — the framework
- systems/ebpf — the underlying BPF subsystem
- concepts/ebpf-profiling — sibling BPF application domain (profiling)
- concepts/workload-specific-kernel-scheduling — what BPF-extensible scheduling enables