sched/core: Omit building stop_sched_class when !SMP
The stop class is invoked through stop_machine only. This is dead code on UP builds. Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20170529210302.26868-3-nicolas.pitre@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
3effcb4247
commit
f5832c1998
@@ -1453,7 +1453,11 @@ static inline void set_curr_task(struct rq *rq, struct task_struct *curr)
|
||||
curr->sched_class->set_curr_task(rq);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define sched_class_highest (&stop_sched_class)
|
||||
#else
|
||||
#define sched_class_highest (&dl_sched_class)
|
||||
#endif
|
||||
#define for_each_class(class) \
|
||||
for (class = sched_class_highest; class; class = class->next)
|
||||
|
||||
|
Reference in New Issue
Block a user