From: Ingo Molnar Date: Wed, 28 May 2025 08:09:15 +0000 (+0200) Subject: sched/smp: Use the SMP version of the idle scheduling class X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=482c4dae75cbe3a3bc7109d6c2346e400facbea8;p=thirdparty%2Flinux.git 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 Acked-by: Peter Zijlstra Cc: Dietmar Eggemann Cc: Juri Lelli Cc: Linus Torvalds Cc: Mel Gorman Cc: Sebastian Andrzej Siewior Cc: Shrikanth Hegde Cc: Steven Rostedt Cc: Valentin Schneider Cc: Vincent Guittot Link: https://lore.kernel.org/r/20250528080924.2273858-35-mingo@kernel.org --- diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 43d6e006cff13..c39b089d4f09b 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c @@ -432,7 +432,6 @@ void cpu_startup_entry(enum cpuhp_state state) * idle-task scheduling class. */ -#ifdef CONFIG_SMP static int select_task_rq_idle(struct task_struct *p, int cpu, int flags) { @@ -444,7 +443,6 @@ balance_idle(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) { return WARN_ON_ONCE(1); } -#endif /* CONFIG_SMP */ /* * Idle tasks are unconditionally rescheduled: @@ -531,11 +529,9 @@ DEFINE_SCHED_CLASS(idle) = { .put_prev_task = put_prev_task_idle, .set_next_task = set_next_task_idle, -#ifdef CONFIG_SMP .balance = balance_idle, .select_task_rq = select_task_rq_idle, .set_cpus_allowed = set_cpus_allowed_common, -#endif .task_tick = task_tick_idle,