Tvrtko Ursulin of Igalia has been leading the work on developing a “fair” DRM scheduler for Linux kernel graphics drivers. This scheduling algorithm is inspired by CFS and aims to improve the experience of running interactive graphical clients in parallel with heavy GPU workloads. This scheduler is inching closer to being ready for the mainline Linux kernel.
The Fair DRM Scheduler aims to schedule better than FIFO scheduling and avoiding priority starvation, a simplification over the existing code, and virtual GPU time based scheduling. The Fair DRM Scheduler has been showing off nice results on the Steam Deck and all-around a nice improvement for the Linux desktop.
Tvrtko Ursulin today sent out the ninth iteration of these patches. Following discussions at the recent XDC developer conference, the patch series has graduated from its request for comments (RFC) phase and now being submitted as normal patches for review. With the RFC flag removed, inching ever closer to hopefully being mainlined into the Linux kernel for enhancing the Direct Rendering Manager drivers.
There are also a variety of other enhancements with this ninth revision:
* RFC -> PATCH for the series as agreed during the XDC.
* Updated interactive benchmark graphs.
* Improved handling of interactive clients by replacing the random noise on tie approach with the average job duration statistics.
* Document in code why we track entity GPU stats in a reference counted structures.
* Document the new structure fields added by the fair policy.
* Undo some tab vs spaces damage.
* More accurate wording in the fair policy commit message.
* Default to fair policy in a separate patch.
* Renamed drm_sched_rq_select_entity to drm_sched_select_entity and make it only take sched.
* Fixed kerneldoc after removing scheduling policies and renaming the rq.
* Reversed arguments of drm_sched_rq_init and cleanup callers. (New patch)
* Removed unused num_rqs from struct drm_sched_args. (New patches)
* More unit tests
Those interested in testing can find the v9 patches of the Fair DRM Scheduler.