Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1 -13
+1 -11
kernel/sched/core.c
··· 5965 5965 for_each_active_class(class) { 5966 5966 if (class->pick_next_task) { 5967 5967 p = class->pick_next_task(rq, prev); 5968 - if (p) { 5969 - const struct sched_class *prev_class = prev->sched_class; 5970 - 5971 - if (class != prev_class && prev_class->switch_class) 5972 - prev_class->switch_class(rq, p); 5968 + if (p) 5973 5969 return p; 5974 - } 5975 5970 } else { 5976 5971 p = class->pick_task(rq); 5977 5972 if (p) { 5978 - const struct sched_class *prev_class = prev->sched_class; 5979 - 5980 5973 put_prev_set_next_task(rq, prev, p); 5981 - 5982 - if (class != prev_class && prev_class->switch_class) 5983 - prev_class->switch_class(rq, p); 5984 5974 return p; 5985 5975 } 5986 5976 }
-2
kernel/sched/sched.h
··· 2385 2385 void (*put_prev_task)(struct rq *rq, struct task_struct *p, struct task_struct *next); 2386 2386 void (*set_next_task)(struct rq *rq, struct task_struct *p, bool first); 2387 2387 2388 - void (*switch_class)(struct rq *rq, struct task_struct *next); 2389 - 2390 2388 #ifdef CONFIG_SMP 2391 2389 int (*select_task_rq)(struct task_struct *p, int task_cpu, int flags); 2392 2390