mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
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:
parent
f422316d74
commit
37cb049ef8
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user