]> Git Repo - linux.git/commit
sched/fair: Implement delayed dequeue
authorPeter Zijlstra <[email protected]>
Thu, 23 May 2024 10:25:32 +0000 (12:25 +0200)
committerPeter Zijlstra <[email protected]>
Sat, 17 Aug 2024 09:06:44 +0000 (11:06 +0200)
commit152e11f6df293e816a6a37c69757033cdc72667d
tree683c09b57827c21d70d2eb56cfee30c368a8ec66
parente1459a50ba31831efdfc35278023d959e4ba775b
sched/fair: Implement delayed dequeue

Extend / fix 86bfbb7ce4f6 ("sched/fair: Add lag based placement") by
noting that lag is fundamentally a temporal measure. It should not be
carried around indefinitely.

OTOH it should also not be instantly discarded, doing so will allow a
task to game the system by purposefully (micro) sleeping at the end of
its time quantum.

Since lag is intimately tied to the virtual time base, a wall-time
based decay is also insufficient, notably competition is required for
any of this to make sense.

Instead, delay the dequeue and keep the 'tasks' on the runqueue,
competing until they are eligible.

Strictly speaking, we only care about keeping them until the 0-lag
point, but that is a difficult proposition, instead carry them around
until they get picked again, and dequeue them at that point.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Tested-by: Valentin Schneider <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
kernel/sched/deadline.c
kernel/sched/fair.c
kernel/sched/features.h
This page took 0.052741 seconds and 4 git commands to generate.