Min: sched_ext: scheduler architecture and interfaces
Changwoo Min has posted anintroduction to writing custom schedulers with sched_ext.
In a particular situation, when each scheduling policy needs itsspecific action, the core kernel scheduler calls an operationdefined in struct sched_class. For example, when the corekernel scheduler needs to select a task to be scheduled, it callsthe sched_class.pick_next_task(rq) callback of a concretescheduling policy. When a task becomes runnable, the core kernelscheduler calls sched_class.enqueue(rq, p, flags) so theconcrete scheduling policy enqueues task p to run queuerq. When a task's runtime state needs to be updated, thecore kernel scheduler calls sched_class.update_curr(rq).