[tip: sched/core] sched/smp: Use the SMP version of sched_update_asym_prefer_cpu()

From: tip-bot2 for Ingo Molnar
Date: Fri Jun 13 2025 - 03:41:23 EST


The following commit has been merged into the sched/core branch of tip:

Commit-ID: 6c8d251621c131274fa05b46fc138f296b00f6e4
Gitweb: https://git.kernel.org/tip/6c8d251621c131274fa05b46fc138f296b00f6e4
Author: Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Wed, 28 May 2025 10:09:14 +02:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Fri, 13 Jun 2025 08:47:21 +02:00

sched/smp: Use the SMP version of sched_update_asym_prefer_cpu()

Simplify the scheduler by making CONFIG_SMP=y code in
sched_update_asym_prefer_cpu() 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-34-mingo@xxxxxxxxxx
---
kernel/sched/topology.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index f2c1016..8e06b1d 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1323,7 +1323,6 @@ next:
/* Update the "asym_prefer_cpu" when arch_asym_cpu_priority() changes. */
void sched_update_asym_prefer_cpu(int cpu, int old_prio, int new_prio)
{
-#ifdef CONFIG_SMP
int asym_prefer_cpu = cpu;
struct sched_domain *sd;

@@ -1373,7 +1372,6 @@ void sched_update_asym_prefer_cpu(int cpu, int old_prio, int new_prio)

WRITE_ONCE(sg->asym_prefer_cpu, asym_prefer_cpu);
}
-#endif /* CONFIG_SMP */
}

/*