Skip to content

Commit caf5bde

Browse files
author
Ingo Molnar
committed
sched/smp: Use the SMP version of the stop-CPU scheduling class
Simplify the scheduler by making CONFIG_SMP=y code in the stop-CPU scheduling class unconditional. Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Dietmar Eggemann <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Shrikanth Hegde <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Valentin Schneider <[email protected]> Cc: Vincent Guittot <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 482c4da commit caf5bde

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

kernel/sched/stop_task.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010
#include "sched.h"
1111

12-
#ifdef CONFIG_SMP
1312
static int
1413
select_task_rq_stop(struct task_struct *p, int cpu, int flags)
1514
{
@@ -21,7 +20,6 @@ balance_stop(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
2120
{
2221
return sched_stop_runnable(rq);
2322
}
24-
#endif /* CONFIG_SMP */
2523

2624
static void
2725
wakeup_preempt_stop(struct rq *rq, struct task_struct *p, int flags)
@@ -107,11 +105,9 @@ DEFINE_SCHED_CLASS(stop) = {
107105
.put_prev_task = put_prev_task_stop,
108106
.set_next_task = set_next_task_stop,
109107

110-
#ifdef CONFIG_SMP
111108
.balance = balance_stop,
112109
.select_task_rq = select_task_rq_stop,
113110
.set_cpus_allowed = set_cpus_allowed_common,
114-
#endif
115111

116112
.task_tick = task_tick_stop,
117113

0 commit comments

Comments
 (0)