mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/6 v2] sched/eevdf: Improve scheduling latency of short slice task
@ 2026-06-15 16:24 Vincent Guittot
  2026-06-15 16:24 ` [PATCH 1/6 v2] sched/fair: Set next buddy for preempt short Vincent Guittot
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Vincent Guittot @ 2026-06-15 16:24 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, vschneid, kprateek.nayak, linux-kernel, qyousef
  Cc: Vincent Guittot

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


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2026-06-17 16:02 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 16:24 [PATCH 0/6 v2] sched/eevdf: Improve scheduling latency of short slice task Vincent Guittot
2026-06-15 16:24 ` [PATCH 1/6 v2] sched/fair: Set next buddy for preempt short Vincent Guittot
2026-06-16  8:51   ` Peter Zijlstra
2026-06-16 13:52     ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 2/6 v2] sched/eevdf: Take into account current's lag when updating slice protection Vincent Guittot
2026-06-16  3:52   ` K Prateek Nayak
2026-06-16 12:11     ` Vincent Guittot
2026-06-16  9:29   ` Peter Zijlstra
2026-06-16 12:49     ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 3/6 v2] sched/eevdf: Update slice protection even when resched is already set Vincent Guittot
2026-06-16  9:37   ` Peter Zijlstra
2026-06-16 13:57     ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 4/6 v2] sched/eevdf: Cancel slice protection if short slice task is eligible Vincent Guittot
2026-06-16  5:34   ` K Prateek Nayak
2026-06-16 12:51     ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 5/6 v2] sched/eevdf: Always update slice protection Vincent Guittot
2026-06-15 16:24 ` [PATCH 6/6 v2] sched/eevdf: Speedup short slice task scheduling Vincent Guittot
2026-06-16 10:57   ` Peter Zijlstra
2026-06-16 15:18     ` Vincent Guittot
2026-06-17 16:01       ` Vincent Guittot
2026-06-16  7:43 ` [PATCH 0/6 v2] sched/eevdf: Improve scheduling latency of short slice task K Prateek Nayak
2026-06-16 13:58   ` Vincent Guittot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®