Commit 37cb049e authored by Tejun Heo's avatar Tejun Heo

sched_ext: Remove sched_class->switch_class()

With sched_ext converted to use put_prev_task() for class switch detection,
there's no user of switch_class() left. Drop it.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
parent f422316d
......@@ -5965,22 +5965,12 @@ __pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
for_each_active_class(class) {
if (class->pick_next_task) {
p = class->pick_next_task(rq, prev);
if (p) {
const struct sched_class *prev_class = prev->sched_class;
if (class != prev_class && prev_class->switch_class)
prev_class->switch_class(rq, p);
if (p)
return p;
}
} else {
p = class->pick_task(rq);
if (p) {
const struct sched_class *prev_class = prev->sched_class;
put_prev_set_next_task(rq, prev, p);
if (class != prev_class && prev_class->switch_class)
prev_class->switch_class(rq, p);
return p;
}
}
......
......@@ -2385,8 +2385,6 @@ struct sched_class {
void (*put_prev_task)(struct rq *rq, struct task_struct *p, struct task_struct *next);
void (*set_next_task)(struct rq *rq, struct task_struct *p, bool first);
void (*switch_class)(struct rq *rq, struct task_struct *next);
#ifdef CONFIG_SMP
int (*select_task_rq)(struct task_struct *p, int task_cpu, int flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment