[tip: sched/core] sched/smp: Use the SMP version of the stop-CPU scheduling class
From: tip-bot2 for Ingo Molnar
Date: Fri Jun 13 2025 - 03:40:53 EST
The following commit has been merged into the sched/core branch of tip:
Commit-ID: caf5bde9c542f0cbdf2c91db7ea9743e33941d91
Gitweb: https://git.kernel.org/tip/caf5bde9c542f0cbdf2c91db7ea9743e33941d91
Author: Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Wed, 28 May 2025 10:09:16 +02:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Fri, 13 Jun 2025 08:47:21 +02:00
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 <mingo@xxxxxxxxxx>
Acked-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
Cc: Juri Lelli <juri.lelli@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Cc: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Valentin Schneider <vschneid@xxxxxxxxxx>
Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20250528080924.2273858-36-mingo@xxxxxxxxxx
---
kernel/sched/stop_task.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/sched/stop_task.c b/kernel/sched/stop_task.c
index 1c1bbc6..2d4e279 100644
--- a/kernel/sched/stop_task.c
+++ b/kernel/sched/stop_task.c
@@ -9,7 +9,6 @@
*/
#include "sched.h"
-#ifdef CONFIG_SMP
static int
select_task_rq_stop(struct task_struct *p, int cpu, int flags)
{
@@ -21,7 +20,6 @@ balance_stop(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
{
return sched_stop_runnable(rq);
}
-#endif /* CONFIG_SMP */
static void
wakeup_preempt_stop(struct rq *rq, struct task_struct *p, int flags)
@@ -107,11 +105,9 @@ DEFINE_SCHED_CLASS(stop) = {
.put_prev_task = put_prev_task_stop,
.set_next_task = set_next_task_stop,
-#ifdef CONFIG_SMP
.balance = balance_stop,
.select_task_rq = select_task_rq_stop,
.set_cpus_allowed = set_cpus_allowed_common,
-#endif
.task_tick = task_tick_stop,