The BPF extensible scheduler class
One of our main goals was to lower the barrier to entry for experimenting with the scheduler. sched_ext provides ergonomic callbacks and helpers to ease common operations such as managing idle CPUs, scheduling tasks on arbitrary CPUs, handling preemptions from other scheduling classes, and more. While sched_ext does require some ramp-up, the complexity is self-contained, and the learning curve gradual. Developers can ramp up by first implementing simple policies such as global FIFO in only tens of lines of code, and then continue to learn the APIs and building blocks available with sched_ext as they build more featureful and complex schedulers.
There is a bit more documentation in this
patch.
The BPF extensible scheduler class
Posted Nov 30, 2022 13:25 UTC (Wed)
by dullfire (guest, #111432)
[Link]
Posted Nov 30, 2022 13:25 UTC (Wed) by dullfire (guest, #111432) [Link]
The BPF extensible scheduler class
Posted Dec 3, 2022 0:23 UTC (Sat)
by riking (subscriber, #95706)
[Link] (1 responses)
Posted Dec 3, 2022 0:23 UTC (Sat) by riking (subscriber, #95706) [Link] (1 responses)
The BPF extensible scheduler class
Posted Dec 4, 2022 17:46 UTC (Sun)
by Manifault (guest, #155796)
[Link]
Posted Dec 4, 2022 17:46 UTC (Sun) by Manifault (guest, #155796) [Link]
/**
* exit - Clean up after the BPF scheduler
* @info: Exit info
*/
void (*exit)(struct scx_exit_info *info);
That ops.exit() callback will be invoked with SCX_EXIT_ERROR_STALL [1] in the event of a hung task causing the BPF scheduler to be evicted, so BPF does have a chance to handle / record / etc the scheduler being evicted for timeouts.
[0]: https://lore.kernel.org/all/20221130082313.3241517-15-tj@...
[1]: https://lore.kernel.org/all/20221130082313.3241517-19-tj@...