Skip to content

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

  1. Kernel-native performance: BPF programs run in kernel context with JIT compilation — no context-switch overhead to user space.
  2. Verifier-guaranteed safety: The BPF verifier ensures the scheduling policy cannot crash the kernel or violate memory safety.
  3. User-space lifecycle: The policy binary lives in user space; load/unload/restart without kernel rebuild or reboot.
  4. 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

Last updated · 585 distilled / 1,765 read