realtime render thread #518
nekopsykose
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
This is actually also quite hard to get right, both the thread part and the realtime part. I closely followed the development in mutter, and they kept running into endless issues where the driver just took slightly too long to process a drm commit synchronously, running mutter over the realtime deadline, and killing it. Or taking a little too long to process a commit asynchronously, leading to random frame drops. I'd rather avoid dealing with that until later, when easier optimizations are done. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
e.g. like sway https://github.com/swaywm/sway/blob/5be5a5005164d3ccff844f4c72836cb49cbf784a/sway/realtime.c#L19 and kwin https://invent.kde.org/plasma/kwin/-/blob/b0970bd6c7c481f210c9bfcd205292cfcbbcba34/src/utils/realtime.cpp#L22 and mutter https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2060 and pipewire module-rt https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/589a06e105838c482dd25518766d8b96a79710c4/src/modules/module-rt.c#L567
the three ways are using RTKit via dbus, or using pthread_setschedparam/syscall via libc::, or using RealtimeThreadSchedulePolicy in https://docs.rs/thread-priority/latest/thread_priority (but i have no idea how to integrate that to the render thread only)
it (hopefully) would lead to slightly improved presentation under load
Beta Was this translation helpful? Give feedback.
All reactions