Re: [PATCH 15/17] [RFC] sched/eevdf: Sleeper bonus

From: Mike Galbraith
Date: Wed Mar 29 2023 - 05:12:02 EST


On Tue, 2023-03-28 at 11:26 +0200, Peter Zijlstra wrote:
> Add a sleeper bonus hack, but keep it default disabled. This should
> allow easy testing if regressions are due to this.
>
> Specifically; this 'restores' performance for things like starve and
> stress-futex, stress-nanosleep that rely on sleeper bonus to compete
> against an always running parent (the fair 67%/33% split vs the
> 50%/50% bonus thing).
>
> OTOH this completely destroys latency and hackbench (as in 5x worse).

I profiled that again, but numbers were still.. not so lovely.

Point of this post is the sleeper/hog split business anyway. I've been
running your patches on my desktop box and cute as button little rpi4b
since they appeared, and poking at them looking for any desktop deltas
and have noticed jack diddly spit.

A lot of benchmarks will notice both distribution and ctx deltas, but
humans.. the numbers I've seen so far say that's highly unlikely.

A couple perf sched lat summaries below for insomniacs.

Load is chrome playing BigBuckBunny (for the zillionth time), which on
this box as I set resolution/size wants ~35% of the box vs 8ms run 1ms
sleep massive_intr, 1 thread per CPU (profiles at ~91%), as a hog-ish
but not absurdly so competitor.

perf.data.stable.full sort=max - top 10 summary
-----------------------------------------------------------------------------------------------------------
Task | Runtime ms | Switches | Avg delay ms | Max delay ms | Sum delay ms |
-----------------------------------------------------------------------------------------------------------
chrome:(7) | 6274.683 ms | 63604 | avg: 0.172 ms | max: 41.796 ms | sum:10930.150 ms |
massive_intr:(8) |1673597.295 ms | 762617 | avg: 0.709 ms | max: 40.383 ms | sum:540374.853 ms |
X:2476 | 86498.438 ms | 129657 | avg: 0.259 ms | max: 36.157 ms | sum:33588.933 ms |
dav1d-worker:(8) | 162369.504 ms | 411962 | avg: 0.682 ms | max: 30.648 ms | sum:280864.249 ms |
ThreadPoolForeg:(13) | 21177.187 ms | 60907 | avg: 0.401 ms | max: 30.424 ms | sum:24412.770 ms |
gmain:(3) | 95.617 ms | 3552 | avg: 0.755 ms | max: 26.365 ms | sum: 2680.738 ms |
llvmpipe-0:(2) | 24602.666 ms | 30828 | avg: 1.278 ms | max: 23.590 ms | sum:39408.811 ms |
llvmpipe-2:(2) | 27707.699 ms | 29226 | avg: 1.236 ms | max: 23.579 ms | sum:36126.717 ms |
llvmpipe-7:(2) | 34437.755 ms | 27017 | avg: 1.097 ms | max: 23.545 ms | sum:29634.448 ms |
llvmpipe-5:(2) | 24533.947 ms | 28503 | avg: 1.375 ms | max: 22.995 ms | sum:39191.132 ms |
-----------------------------------------------------------------------------------------------------------
TOTAL: |2314609.811 ms | 2473891 | 96.4% util, 27.7% GUI 41.796 ms | 1361629.825 ms |
-----------------------------------------------------------------------------------------------------------

perf.data.eevdf.full sort=max - top 10 summary
-----------------------------------------------------------------------------------------------------------
Task | Runtime ms | Switches | Avg delay ms | Max delay ms | Sum delay ms |
-----------------------------------------------------------------------------------------------------------
chrome:(8) | 6329.996 ms | 80080 | avg: 0.193 ms | max: 28.835 ms | sum:15432.012 ms |
ThreadPoolForeg:(20) | 20477.539 ms | 158457 | avg: 0.265 ms | max: 25.708 ms | sum:42003.063 ms |
dav1d-worker:(8) | 168022.569 ms | 1090719 | avg: 0.366 ms | max: 24.786 ms | sum:398971.023 ms |
massive_intr:(8) |1736052.944 ms | 721103 | avg: 0.658 ms | max: 23.427 ms | sum:474493.391 ms |
llvmpipe-5:(2) | 22970.555 ms | 31184 | avg: 1.448 ms | max: 22.465 ms | sum:45148.667 ms |
llvmpipe-3:(2) | 22803.121 ms | 31688 | avg: 1.436 ms | max: 22.076 ms | sum:45516.196 ms |
llvmpipe-0:(2) | 22050.612 ms | 33580 | avg: 1.397 ms | max: 22.007 ms | sum:46898.028 ms |
VizCompositorTh:5538 | 90856.230 ms | 91865 | avg: 0.605 ms | max: 21.702 ms | sum:55542.418 ms |
llvmpipe-1:(2) | 22866.426 ms | 32870 | avg: 1.390 ms | max: 20.732 ms | sum:45690.066 ms |
llvmpipe-2:(2) | 22672.646 ms | 32319 | avg: 1.415 ms | max: 20.647 ms | sum:45731.838 ms |
-----------------------------------------------------------------------------------------------------------
TOTAL: |2332092.393 ms | 3449563 | 97.1% util, 25.6% GUI 28.835 ms | 1570459.986 ms |
-----------------------------------------------------------------------------------------------------------
vs stable 1.394 distribution delta.. meaningless 1.153