Skip to content

Commit 9fd5da7

Browse files
committed
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 <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-38-mingo@kernel.org
1 parent 1724088 commit 9fd5da7

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

kernel/sched/sched.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,11 +1301,7 @@ static inline int cpu_of(struct rq *rq)
13011301

13021302
static inline bool is_migration_disabled(struct task_struct *p)
13031303
{
1304-
#ifdef CONFIG_SMP
13051304
return p->migration_disabled;
1306-
#else
1307-
return false;
1308-
#endif
13091305
}
13101306

13111307
DECLARE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);

0 commit comments

Comments
 (0)