sched_ext: switch class when preempted by higher priority scheduler
PATCH 1/1 sched_ext: switch class when preempted by higher priority scheduler
It might be helpful to give BPF Scheduler a chance to invoke cpu_release() function, if defined, when preempted by a higher priority scheduler class task.
--- kernel/sched/ext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/sched/ext.c +2 -1
@@ -3034,7 +3034,7 @@ static void put_prev_task_scx(struct rq *rq, struct task_struct *p,*/ if (p->scx.slice && !scx_rq_bypassing (rq)) {dispatch_enqueue (&rq->scx.local_dsq, p,SCX_ENQ_HEAD ); -return ; + goto switch_class; }/*
@@ -3051,6 +3051,7 @@ static void put_prev_task_scx(struct rq *rq, struct task_struct *p, } } +switch_class:if (next && next->sched_class != &ext_sched_class)switch_class (rq, next); }
Signature · 1 line
2.45.2
Hello, Honglei.
Quoted 5 lines · Honglei Wang
It might be helpful to give BPF Scheduler a chance to invoke
cpu_release()function, if defined, when preempted by a higher priority scheduler class task.Signed-off-by Honglei Wang <[email protected]>
Can you update the patch description indicating that this is a bug fix? ops.cpu_release() must be invoked in this case but is being skipped.
Thanks.
Signature · 1 line
tejun
Quoted 7 lines · Tejun Heo
Hello, Honglei.
Quoted 4 lines · Honglei Wang
It might be helpful to give BPF Scheduler a chance to invoke
cpu_release()function, if defined, when preempted by a higher priority scheduler class task.
Quoted 7 lines
Quoted 1 line
Signed-off-by Honglei Wang <[email protected]>Can you update the patch description indicating that this is a bug fix?
ops.cpu_release()must be invoked in this case but is being skipped.Thanks.
OK, will send a update later.
Thanks,
Honglei