]> git.ipfire.org Git - thirdparty/linux.git/commit
sched, sched_ext: Simplify dl_prio() case handling in sched_fork()
authorTejun Heo <tj@kernel.org>
Mon, 24 Jun 2024 20:51:49 +0000 (10:51 -1000)
committerTejun Heo <tj@kernel.org>
Mon, 8 Jul 2024 18:55:46 +0000 (08:55 -1000)
commit60564acbef5c43eeb11ecadf6efe17ac255a80b1
tree4b0c93d507f4cf852c53692f49eb215df9d83742
parent6203ef73fa5c0358f7960b038628259be1448724
sched, sched_ext: Simplify dl_prio() case handling in sched_fork()

sched_fork() returns with -EAGAIN if dl_prio(@p). a7a9fc549293 ("sched_ext:
Add boilerplate for extensible scheduler class") added scx_pre_fork() call
before it and then scx_cancel_fork() on the exit path. This is silly as the
dl_prio() block can just be moved above the scx_pre_fork() call.

Move the dl_prio() block above the scx_pre_fork() call and remove the now
unnecessary scx_cancel_fork() invocation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Vernet <void@manifault.com>
kernel/sched/core.c