Min: sched_ext: a BPF-extensible scheduler class (Part 1)
Changwoo Min providesan introduction to the sched_ext scheduling class:
Sched_ext was proposed to address the problems mentioned above. Itallows users to write a custom scheduling policy using BPF withoutmodifying the kernel code. You don't need to struggle to maintainthe out-of-tree custom scheduler. In addition, BPF provides a safekernel programming environment. In particular, the BPF verifierensures that your custom scheduler has neither a memory bug nor aninfinite loop. Also, if your custom scheduler misbehaves -- likefailing to schedule a task for too long (say 30 seconds), thekernel portion of sched_ext kills your custom scheduler and fallsback to the default kernel scheduler (CFS or EEVDF). Last but notleast, you can update the BPF scheduler without reinstalling thekernel and rebooting a server.
(LWN looked at sched_ext in February 2023).