From: Ingo Molnar Date: Wed, 28 May 2025 08:09:18 +0000 (+0200) Subject: sched/smp: Use the SMP version of is_migration_disabled() X-Git-Tag: io_uring-6.17-20250808~17^2~42 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=9fd5da7989ba6175fe71439738ddcf4c030d3d51;p=linux-block.git sched/smp: Use the SMP version of is_migration_disabled() Simplify the scheduler by making the CONFIG_SMP-only code in is_migration_disabled() unconditional. 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-38-mingo@kernel.org --- diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 234dd28e2bec..b184c3d61ba2 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1301,11 +1301,7 @@ static inline int cpu_of(struct rq *rq) static inline bool is_migration_disabled(struct task_struct *p) { -#ifdef CONFIG_SMP return p->migration_disabled; -#else - return false; -#endif } DECLARE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);