mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
sched_ext: switch class when preempted by higher priority scheduler
ops.cpu_release() function, if defined, must be invoked when preempted by a higher priority scheduler class task. This scenario was skipped in commitf422316d74("sched_ext: Remove switch_class_scx()"). Let's fix it. Fixes:f422316d74("sched_ext: Remove switch_class_scx()") Signed-off-by: Honglei Wang <jameshongleiwang@126.com> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
6268d5bc10
commit
68e449d849
|
|
@ -3037,7 +3037,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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -3054,6 +3054,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user