Skip to content

Default to high thread priority of the KMS thread instead of realtime priority

Jonas Ådahl requested to merge jadahl/mutter:wip/high-priority-scheduling into main

In contrast to realtime scheduling, this doesn't risk us getting SIGKILL:ed when the kernel is doing busy looping in drmModeAtomicCommit() for some reason, but will according to testing, right now, give us more or less the same benefit when it comes to dispatch lateness and commit lateness.

Stats measured by @daenzer when frantically moving the mouse cursor while compiling mesa in the background, which roughly matched what happened on my system as well with the same reproduction steps:

x high-lateness.txt
+ rt-lateness.txt
+------------------------------------------------------------------------------+
|          *                                                                   |
|        x *                                                                   |
|        xx*xx                           +                      x              |
|        *****++  x       +       + +    +        +     x       xx   x      + x|
||____|_____M_M__________AA_________________|______|                           |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  22            62          4029           235     1062.0909      1440.673
+  17            77          3902           352     981.94118     1086.0443
No difference proven at 95.0% confidence

---

x high-duration.txt
+ rt-duration.txt
+------------------------------------------------------------------------------+
|         xx+                                                                  |
|         xx*+                                                                 |
|         ***+                                                                 |
|         ***** * x +     x   x   +      x              x       +             +|
||___|______MM___A___A______|____________|                                     |
+------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  22           145          2488           225     480.36364     601.16122
+  17           135          3617           275     698.70588     1014.6407
No difference proven at 95.0% confidence
Edited by Jonas Ådahl

Merge request reports

Loading