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: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
This commit is contained in:
Tejun Heo 2024-09-03 21:54:29 -10:00
parent f422316d74
commit 37cb049ef8
2 changed files with 1 additions and 13 deletions

View File

@ -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;
}
}

View File

@ -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);