Skip to content

Commit 482c4da

Browse files
author
Ingo Molnar
committed
sched/smp: Use the SMP version of the idle scheduling class
Simplify the scheduler by making CONFIG_SMP=y code in the idle scheduling classunconditional. 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 6c8d251 commit 482c4da

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

kernel/sched/idle.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,6 @@ void cpu_startup_entry(enum cpuhp_state state)
432432
* idle-task scheduling class.
433433
*/
434434

435-
#ifdef CONFIG_SMP
436435
static int
437436
select_task_rq_idle(struct task_struct *p, int cpu, int flags)
438437
{
@@ -444,7 +443,6 @@ balance_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
444443
{
445444
return WARN_ON_ONCE(1);
446445
}
447-
#endif /* CONFIG_SMP */
448446

449447
/*
450448
* Idle tasks are unconditionally rescheduled:
@@ -531,11 +529,9 @@ DEFINE_SCHED_CLASS(idle) = {
531529
.put_prev_task = put_prev_task_idle,
532530
.set_next_task = set_next_task_idle,
533531

534-
#ifdef CONFIG_SMP
535532
.balance = balance_idle,
536533
.select_task_rq = select_task_rq_idle,
537534
.set_cpus_allowed = set_cpus_allowed_common,
538-
#endif
539535

540536
.task_tick = task_tick_idle,
541537

0 commit comments

Comments
 (0)