]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched/smp: Use the SMP version of sched_update_asym_prefer_cpu()
authorIngo Molnar <mingo@kernel.org>
Wed, 28 May 2025 08:09:14 +0000 (10:09 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 13 Jun 2025 06:47:21 +0000 (08:47 +0200)
Simplify the scheduler by making CONFIG_SMP=y code in
sched_update_asym_prefer_cpu() unconditional.

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-34-mingo@kernel.org
kernel/sched/topology.c

index f2c10167f2bc895faf2e21bb9ad36536ca86fff8..8e06b1d22e91e1c2b56b1b0e1b39e50051811ccf 100644 (file)
@@ -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 */
 }
 
 /*