Min: sched_ext: a BPF-extensible scheduler class (Part 1)

Post Syndicated from corbet original https://lwn.net/Articles/955481/

Changwoo Min provides
an introduction to the sched_ext scheduling class
:

Sched_ext was proposed to address the problems mentioned above. It
allows users to write a custom scheduling policy using BPF without
modifying the kernel code. You don’t need to struggle to maintain
the out-of-tree custom scheduler. In addition, BPF provides a safe
kernel programming environment. In particular, the BPF verifier
ensures that your custom scheduler has neither a memory bug nor an
infinite loop. Also, if your custom scheduler misbehaves — like
failing to schedule a task for too long (say 30 seconds), the
kernel portion of sched_ext kills your custom scheduler and falls
back to the default kernel scheduler (CFS or EEVDF). Last but not
least, you can update the BPF scheduler without reinstalling the
kernel and rebooting a server.

(LWN looked at sched_ext in February 2023).