]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/fair: Revert force wakeup preemption
authorVincent Guittot <vincent.guittot@linaro.org>
Fri, 23 Jan 2026 10:28:58 +0000 (11:28 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 23 Jan 2026 10:53:20 +0000 (11:53 +0100)
commit15257cc2f905dbf5813c0bfdd3c15885f28093c4
tree4313c6614389d883c6a8125a760dba81db359cbf
parent4f70f106bca1a56bd66d00830ac91680bd754974
sched/fair: Revert force wakeup preemption

This agressively bypasses run_to_parity and slice protection with the
assumpiton that this is what waker wants but there is no garantee that
the wakee will be the next to run. It is a better choice to use
yield_to_task or WF_SYNC in such case.

This increases the number of resched and preemption because a task becomes
quickly "ineligible" when it runs; We update the task vruntime periodically
and before the task exhausted its slice or at least quantum.

Example:
2 tasks A and B wake up simultaneously with lag = 0. Both are
eligible. Task A runs 1st and wakes up task C. Scheduler updates task
A's vruntime which becomes greater than average runtime as all others
have a lag == 0 and didn't run yet. Now task A is ineligible because
it received more runtime than the other task but it has not yet
exhausted its slice nor a min quantum. We force preemption, disable
protection but Task B will run 1st not task C.

Sidenote, DELAY_ZERO increases this effect by clearing positive lag at
wake up.

Fixes: e837456fdca8 ("sched/fair: Reimplement NEXT_BUDDY to align with EEVDF goals")
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260123102858.52428-1-vincent.guittot@linaro.org
kernel/sched/fair.c