Commit ba59a20
sched: Initialize idle tasks only once
[ Upstream commit b23decf ]
Idle tasks are initialized via __sched_fork() twice:
fork_idle()
copy_process()
sched_fork()
__sched_fork()
init_idle()
__sched_fork()
Instead of cleaning this up, sched_ext hacked around it. Even when analyis
and solution were provided in a discussion, nobody cared to clean this up.
init_idle() is also invoked from sched_init() to initialize the boot CPU's
idle task, which requires the __sched_fork() invocation. But this can be
trivially solved by invoking __sched_fork() before init_idle() in
sched_init() and removing the __sched_fork() invocation from init_idle().
Do so and clean up the comments explaining this historical leftover.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20241028103142.359584747@linutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 8e72738 commit ba59a20
1 file changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4488 | 4488 | | |
4489 | 4489 | | |
4490 | 4490 | | |
4491 | | - | |
| 4491 | + | |
| 4492 | + | |
4492 | 4493 | | |
4493 | 4494 | | |
4494 | 4495 | | |
| |||
9257 | 9258 | | |
9258 | 9259 | | |
9259 | 9260 | | |
9260 | | - | |
9261 | | - | |
9262 | 9261 | | |
9263 | 9262 | | |
9264 | 9263 | | |
| |||
9273 | 9272 | | |
9274 | 9273 | | |
9275 | 9274 | | |
9276 | | - | |
9277 | | - | |
9278 | | - | |
9279 | | - | |
| 9275 | + | |
| 9276 | + | |
9280 | 9277 | | |
9281 | 9278 | | |
9282 | 9279 | | |
| |||
10105 | 10102 | | |
10106 | 10103 | | |
10107 | 10104 | | |
| 10105 | + | |
10108 | 10106 | | |
10109 | 10107 | | |
10110 | 10108 | | |
| |||
0 commit comments