sched_ext: Introduce scx_bpf_cpu_curr()
Provide scx_bpf_cpu_curr() as a way for scx schedulers to check the curr task of a remote rq without assuming its lock is held. Many scx schedulers make use of scx_bpf_cpu_rq() to check a remote curr (e.g. to see if it should be preempted). This is problematic because scx_bpf_cpu_rq() provides access to all fields of struct rq, most of which aren't safe to use without holding the associated rq lock. Signed-off-by:Christian Loehle <christian.loehle@arm.com> Acked-by:
Andrea Righi <arighi@nvidia.com> Signed-off-by:
Tejun Heo <tj@kernel.org>
Loading
Please sign in to comment