Re: [PATCH 2/2] sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion
From: Mike Galbraith
Date: Tue Sep 19 2023 - 03:55:01 EST
On Fri, 2023-09-15 at 14:43 +0200, peterz@xxxxxxxxxxxxx wrote:
> Allow applications to directly set a suggested request/slice length using
> sched_attr::sched_runtime.
I met an oddity while fiddling to see what a custom slice would do for
cyclictest, it seeming to be reasonable target. $subject seems to be
working fine per live peek with crash, caveat being it's not alone in
otherwise virgin source...
homer:..kernel/linux-tip # make -j8 vmlinux && killall cyclictest
Elsewhere, post build/kill...
instance-a, stock
homer:/root # cyclictest -Smq
# /dev/cpu_dma_latency set to 0us
T: 0 (17763) P: 0 I:1000 C: 297681 Min: 2 Act: 51 Avg: 66 Max: 10482
T: 1 (17764) P: 0 I:1500 C: 198639 Min: 2 Act: 3159 Avg: 70 Max: 9054
T: 2 (17765) P: 0 I:2000 C: 149075 Min: 2 Act: 52 Avg: 78 Max: 8190
T: 3 (17766) P: 0 I:2500 C: 119867 Min: 2 Act: 55 Avg: 77 Max: 8328
T: 4 (17767) P: 0 I:3000 C: 99888 Min: 2 Act: 51 Avg: 90 Max: 8483
T: 5 (17768) P: 0 I:3500 C: 85748 Min: 3 Act: 53 Avg: 76 Max: 8148
T: 6 (17769) P: 0 I:4000 C: 75153 Min: 3 Act: 53 Avg: 92 Max: 7510
T: 7 (17770) P: 0 I:4500 C: 66807 Min: 3 Act: 55 Avg: 81 Max: 8709
instance-b, launched w. custom slice, and verifies via live peek with crash.
homer:/root # schedtool -v -s 100000 -e cyclictest -Smq
PID 17753: PRIO 0, POLICY N: SCHED_NORMAL , NICE 0, EEVDF_NICE 0, EEVDF_SLICE 100000, AFFINITY 0xff
# /dev/cpu_dma_latency set to 0us
T: 0 (17754) P: 0 I:1000 C: 297014 Min: 1 Act: 51 Avg: 79 Max: 9584
T: 1 (17755) P: 0 I:1500 C: 198401 Min: 1 Act: 3845 Avg: 118 Max: 9995
T: 2 (17756) P: 0 I:2000 C: 149137 Min: 1 Act: 103 Avg: 125 Max: 8863
T: 3 (17757) P: 0 I:2500 C: 119519 Min: 1 Act: 52 Avg: 218 Max: 9704
T: 4 (17758) P: 0 I:3000 C: 99760 Min: 1 Act: 51 Avg: 134 Max: 11108
T: 5 (17759) P: 0 I:3500 C: 85731 Min: 1 Act: 53 Avg: 234 Max: 9649
T: 6 (17760) P: 0 I:4000 C: 75321 Min: 2 Act: 53 Avg: 139 Max: 7351
T: 7 (17761) P: 0 I:4500 C: 66929 Min: 3 Act: 51 Avg: 191 Max: 6469
^^^ hmm
Those Avg: numbers follow the custom slice.
homer:/root # schedtool -v -s 500000 -e cyclictest -Smq
PID 29755: PRIO 0, POLICY N: SCHED_NORMAL , NICE 0, EEVDF_NICE 0, EEVDF_SLICE 500000, AFFINITY 0xff
# /dev/cpu_dma_latency set to 0us
T: 0 (29756) P: 0 I:1000 C: 352348 Min: 1 Act: 51 Avg: 67 Max: 10259
T: 1 (29757) P: 0 I:1500 C: 229618 Min: 1 Act: 59 Avg: 121 Max: 8439
T: 2 (29758) P: 0 I:2000 C: 176031 Min: 1 Act: 54 Avg: 159 Max: 8839
T: 3 (29759) P: 0 I:2500 C: 139346 Min: 1 Act: 52 Avg: 186 Max: 9498
T: 4 (29760) P: 0 I:3000 C: 117779 Min: 2 Act: 54 Avg: 172 Max: 8862
T: 5 (29761) P: 0 I:3500 C: 101272 Min: 1 Act: 54 Avg: 180 Max: 9331
T: 6 (29762) P: 0 I:4000 C: 88781 Min: 3 Act: 54 Avg: 208 Max: 7111
T: 7 (29763) P: 0 I:4500 C: 78986 Min: 1 Act: 143 Avg: 168 Max: 6677
homer:/root # cyclictest -Smq
# /dev/cpu_dma_latency set to 0us
T: 0 (29747) P: 0 I:1000 C: 354262 Min: 2 Act: 51 Avg: 65 Max: 9754
T: 1 (29748) P: 0 I:1500 C: 236885 Min: 1 Act: 43 Avg: 56 Max: 8434
T: 2 (29749) P: 0 I:2000 C: 177461 Min: 3 Act: 53 Avg: 75 Max: 9028
T: 3 (29750) P: 0 I:2500 C: 142315 Min: 2 Act: 53 Avg: 74 Max: 7654
T: 4 (29751) P: 0 I:3000 C: 118642 Min: 3 Act: 51 Avg: 78 Max: 8169
T: 5 (29752) P: 0 I:3500 C: 101833 Min: 3 Act: 52 Avg: 75 Max: 7790
T: 6 (29753) P: 0 I:4000 C: 89065 Min: 3 Act: 52 Avg: 76 Max: 8001
T: 7 (29754) P: 0 I:4500 C: 79323 Min: 3 Act: 54 Avg: 78 Max: 7703