[PATCH 0/6 v2] sched/eevdf: Improve scheduling latency of short slice task

From: Vincent Guittot

Date: Mon Jun 15 2026 - 12:27:43 EST


This series continues to improve the scheduling latency of tasks with
shorter slice duration by mainly canceling, updating or minimizing the
protection of the running tasks when appropriate.

Benchmarks, like hackbench, haven't seen any noticeable performance
differences with this patchset (The default 2.8ms slice has been used for
testing performance regressions)

Several use cases has been used to testing the scheduling latency of short
slice tasks:
- cyclictest with a 3777us period and a 8ms slice alone
- cyclictest with a 3777us period and a 8ms slice. 2xNR_CPUS rt-app
tasks that run (8177us) and sleep (17777us) with a 16ms slice.
- cyclictest with a 3777us period and a 8ms slice. Hackbench with
1 group using thread and pipe and a 16ms slice.

NB: periods and run duration have been chosen to minimize alignment
with tick or other periodic activities.

scheduling latency (us) for cyclictest
tip/sched/core| this patchset | tip/sched/core
slice 8ms | 8ms | 2.8ms
90th Percentile 80 | 79 ( 1 %) | 56 (+30 %)
99th Percentile 93 | 90 (+ 3 %) | 60 (+35 %)
99.9th Percentile 184 | 145 (+21 %) | 67 (+64 %)
Maximum 7526 | 2649 (+65 %) | 2647 (+65 %)

scheduling latency (us) for cyclictest and rt-app
tip/sched/core| this patchset | tip/sched/core
slice 8ms / 16ms | 8ms / 16 ms | 2.8ms / 2.8ms
90th Percentile 61 | 66 (- 8 %) | 440 (-621 %)
99th Percentile 8453 | 2359 (+72 %) | 3167 (+ 63 %)
99.9th Percentile 14053 | 5026 (+64 %) | 5290 (+ 62 %)
Maximum 20924 | 7851 (+62 %) | 8727 (+ 58 %)

scheduling latency (us) for cyclictest and hackbench
tip/sched/core| this patchset | tip/sched/core
slice 8ms / 16ms | 8ms / 16 ms | 2.8ms / 2.8ms
90th Percentile 63 | 63 ( 0 %) | 1237 (-1863 %)
99th Percentile 76 | 79 (- 4 %) | 4575 (-5920 %)
99.9th Percentile 2827 | 1021 (+64 %) | 8312 (- 194 %)
Maximum 15795 | 4766 (+70 %) | 14519 (+ 8 %)

Since v1:
- Use the correct min_vruntime() instead of min()

Vincent Guittot (6):
sched/fair: Set next buddy for preempt short
sched/eevdf: Take into account current's lag when updating slice
protection
sched/eevdf: Update slice protection even when resched is already set
sched/eevdf: Cancel slice protection if short slice task is eligible
sched/eevdf: Always update slice protection
sched/eevdf: Speedup short slice task scheduling

kernel/sched/fair.c | 43 +++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)

--
2.43.0