mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] Improving latency of short slice tasks
@ 2026-09-21 15:22 Vincent Guittot
  2026-09-21 15:22 ` [PATCH 1/8] sched/eevdf: Ensure that vprot will never go above a min slice Vincent Guittot
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Vincent Guittot @ 2026-09-21 15:22 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, vschneid, kprateek.nayak, linux-kernel
  Cc: qyousef, Vincent Guittot

This is another round of scheduling latency improvements which fix
some remaining corner cases and start to fix somes cases when multi
short slice tasks are running simultaneously on the system.

I run my usual set of scheduling latency tests on dragonboard rb5
- 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.

Each test is 130 seconds long

scheduling latency (us) for cyclictest
                   tip/sched/core| this patchset
slice                 8ms        |  8ms         
99th Percentile               91 |    90 (+ 1 %)
99.9th Percentile            126 |   108 (+14 %)
Maximum                     2273 |  1018 (+55 %)

scheduling latency (us) for cyclictest and rt-app
                   tip/sched/core| this patchset
slice                 8ms / 16ms |  8ms  / 16 ms
99th Percentile               66 |    66 (  0 %)
99.9th Percentile           1104 |   832 (+25 %)
Maximum                     6165 |  3041 (+51 %)

scheduling latency (us) for cyclictest and hackbench
                   tip/sched/core| this patchset
slice                 8ms / 16ms |  8ms  / 16 ms
99th Percentile               75 |    75 (  0 %)
99.9th Percentile            730 |   637 (+13 %)
Maximum                    15996 |  8124 (+49 %)

Beside the results above I noticed significants performance improvements
for hackbench with pipe which were not expected.
"sched/eevdf: Decay positive lag of sleeping entities" is the patch that
provides most of the performance improvements

The test were run with the default 2.8ms slice to check for some
performance regressions

hackbench             tip/sched/core   this patchset
 1 group process pipe 0,863(+/-2.6%)   0,764(+/-2.6%) (+11%)
 4 group process pipe 0,721(+/-2.6%)   0,561(+/-2.1%) (+22%)
 8 group process pipe 0,661(+/-2.3%)   0,496(+/-1.9%) (+25%)
16 group process pipe 0,630(+/-1.4%)   0,498(+/-1.6%) (+21%)
 1 group thread  pipe 0,925(+/-2.4%)   0,813(+/-2.2%) (+12%)
 4 group thread  pipe 0,846(+/-2.8%)   0,614(+/-4.4%) (+27%)
 8 group thread  pipe 0,750(+/-6.3%)   0,524(+/-0.9%) (+30%)
16 group thread  pipe 0,640(+/-3.1%)   0,506(+/-0.9%) (+21%)

Those tests have been run with perf scheduler (Using schedutil and EAS
provides similar results)

Vincent Guittot (8):
  sched/eevdf: Ensure that vprot will never go above a min slice
  sched/eevdf: Align update_protect_slice to set_protect_slice
  sched/eevdf: Handle more short slice waking cases
  sched/eevdf: Decay positive lag of sleeping entities
  sched/eevdf: Reset lag when waking up on idle cpu
  sched/eevdf: Add per cpu cached min_slice
  sched/eevdf: Compare min slice during wake_affine
  sched/eevdf: Add min slice check when selecting CPU

 kernel/sched/fair.c | 174 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 159 insertions(+), 15 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-09-22 14:32 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 15:22 [PATCH 0/8] Improving latency of short slice tasks Vincent Guittot
2026-09-21 15:22 ` [PATCH 1/8] sched/eevdf: Ensure that vprot will never go above a min slice Vincent Guittot
2026-09-21 15:22 ` [PATCH 2/8] sched/eevdf: Align update_protect_slice to set_protect_slice Vincent Guittot
2026-09-21 15:22 ` [PATCH 3/8] sched/eevdf: Handle more short slice waking cases Vincent Guittot
2026-09-21 15:22 ` [PATCH 4/8] sched/eevdf: Decay positive lag of sleeping entities Vincent Guittot
2026-09-22 10:02   ` Peter Zijlstra
2026-09-22 10:40     ` Peter Zijlstra
2026-09-22 12:56     ` Vincent Guittot
2026-09-22 13:28       ` Peter Zijlstra
2026-09-22 14:21         ` Vincent Guittot
2026-09-21 15:22 ` [PATCH 5/8] sched/eevdf: Reset lag when waking up on idle cpu Vincent Guittot
2026-09-21 16:06   ` Kayra Cizmeci
2026-09-22  5:56     ` Vincent Guittot
2026-09-22 10:13   ` Peter Zijlstra
2026-09-22 14:20     ` Vincent Guittot
2026-09-22 14:32     ` Kayra Cizmeci
2026-09-21 15:22 ` [PATCH 6/8] sched/eevdf: Add per cpu cached min_slice Vincent Guittot
2026-09-22 10:17   ` Peter Zijlstra
2026-09-22 14:19     ` Vincent Guittot
2026-09-21 15:22 ` [PATCH 7/8] sched/eevdf: Compare min slice during wake_affine Vincent Guittot
2026-09-21 15:22 ` [PATCH 8/8] sched/eevdf: Add min slice check when selecting CPU Vincent Guittot
2026-09-22 10:46   ` Peter Zijlstra
2026-09-22 12:31     ` 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®