aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-05-28 10:09:05 +0200
committerIngo Molnar <mingo@kernel.org>2025-06-13 08:47:19 +0200
commit8039addbe5a56e4108b1bea57aa5b3f70750fed9 (patch)
treed33132528619bb9e82bb850ece00c8ffbed19a59 /kernel
parentsched/smp: Use the SMP version of try_to_wake_up() (diff)
downloadlinux-8039addbe5a56e4108b1bea57aa5b3f70750fed9.tar.gz
linux-8039addbe5a56e4108b1bea57aa5b3f70750fed9.zip
sched/smp: Use the SMP version of __task_needs_rq_lock()
Simplify the scheduler by making CONFIG_SMP=y code in __task_needs_rq_lock() 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-25-mingo@kernel.org
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d20fea6a380e..82b7cdb353d8 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4312,14 +4312,12 @@ static bool __task_needs_rq_lock(struct task_struct *p)
if (p->on_rq)
return true;
-#ifdef CONFIG_SMP
/*
* Ensure the task has finished __schedule() and will not be referenced
* anymore. Again, see try_to_wake_up() for a longer comment.
*/
smp_rmb();
smp_cond_load_acquire(&p->on_cpu, !VAL);
-#endif
return false;
}