Skip to content

Commit 482c4da

Browse files
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 <mingo@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Shrikanth Hegde <sshegde@linux.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Valentin Schneider <vschneid@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lore.kernel.org/r/20250528080924.2273858-35-mingo@kernel.org
1 parent 6c8d251 commit 482c4da

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

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)