Skip to content

Commit 1f25730

Browse files
author
Ingo Molnar
committed
sched/smp: Use the SMP version of sched_exec()
Simplify the scheduler making CONFIG_SMP=y sched_exec() code unconditional. Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: Dietmar Eggemann <[email protected]> Cc: Juri Lelli <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Shrikanth Hegde <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Valentin Schneider <[email protected]> Cc: Vincent Guittot <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5884676 commit 1f25730

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

include/linux/sched/task.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,7 @@ int kernel_wait(pid_t pid, int *stat);
109109
extern void free_task(struct task_struct *tsk);
110110

111111
/* sched_exec is called by processes performing an exec */
112-
#ifdef CONFIG_SMP
113112
extern void sched_exec(void);
114-
#else
115-
#define sched_exec() {}
116-
#endif
117113

118114
static inline struct task_struct *get_task_struct(struct task_struct *t)
119115
{

kernel/sched/core.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5419,8 +5419,6 @@ unsigned int nr_iowait(void)
54195419
return sum;
54205420
}
54215421

5422-
#ifdef CONFIG_SMP
5423-
54245422
/*
54255423
* sched_exec - execve() is a valuable balancing opportunity, because at
54265424
* this point the task has the smallest effective memory and cache footprint.
@@ -5444,8 +5442,6 @@ void sched_exec(void)
54445442
stop_one_cpu(task_cpu(p), migration_cpu_stop, &arg);
54455443
}
54465444

5447-
#endif /* CONFIG_SMP */
5448-
54495445
DEFINE_PER_CPU(struct kernel_stat, kstat);
54505446
DEFINE_PER_CPU(struct kernel_cpustat, kernel_cpustat);
54515447

0 commit comments

Comments
 (0)