How sched-ext/scx works
Main Components Identification
The system consists of these primary components:
• Kernel Space (BPF Schedulers)
• User Space (Rust/C Implementations)
• Support Libraries
• Tools and Utilities
• Service Management
┌─────────────────────────────────────────────────────────┐
• Linux Kernel │
• ┌─────────────────┐ ┌────────────────────┐ │
• sched_ext │◄─────►│ BPF Runtime │ │
• ┘ └────────────────────┘ │
• ┘
• ▲
┌─────────────────────────────────────────────────────────┐
• User Space │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• Schedulers │ │ Libraries │ │ Tools │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┘
┌────────────────────────────────────────────┐
• Schedulers │
• ┌──────────┐ ┌─────────────┐ │
• C │ │ Rust │ │
• Schedulers│ │ Schedulers │ │
• ┘ └─────────────┘ │
• ┘
┌────────────────────────────────────────┐
• Support Libraries │
• ┌─────────────┐ ┌──────────────┐ │
• scx_utils │ │ libbpf │ │
• ┘ └──────────────┘ │
• ┘
Component Relationships
• BPF programs loading into kernel (↑)
• Library dependencies (→)
• Service management connections (↔)
• Data flow between components (⇢)
Additional Details
Callouts for:
• Build system (meson)
• Configuration management
• Monitoring tools (scxtop)
• Service management (systemd/OpenRC)
Implementation Notes
Annotations for:
• BPF program loading paths
• Scheduler registration process
• Statistics collection points
• Configuration loading points