+92
−65
+54
−36
File changed.
Preview size limit exceeded, changes collapsed.
+43
−1
Loading
In preparation for multiple scheduler support, introduce scx_prog_sched() accessor which returns the scx_sched instance associated with a BPF program. The association is determined via the special KF_IMPLICIT_ARGS kfunc parameter, which provides access to bpf_prog_aux. This aux can be used to retrieve the struct_ops (sched_ext_ops) that the program is associated with, and from there, the corresponding scx_sched instance. For compatibility, when ops.sub_attach is not implemented (older schedulers without sub-scheduler support), unassociated programs fall back to scx_root. A warning is logged once per scheduler for such programs. As scx_root is still the only scheduler, this shouldn't introduce user-visible behavior changes. Signed-off-by:Tejun Heo <tj@kernel.org> Reviewed-by:
Andrea Righi <arighi@nvidia.com>
File changed.
Preview size limit exceeded, changes collapsed.