GNOME Bugzilla – Bug 791024
Backport "poll() on KMS fd on EAGAIN" to stable
Last modified: 2017-12-15 09:17:56 UTC
This issue eats a lot of CPU time causing busy waiting (CPU usage between 30-70%) when doing lightweight task like displaying a spinner or moving the mouse. I have not done further testing than compiling the patch, as mutter currently fails to build from source on Fedora 27 (some issue with a pipewire include). We have verified though that the problem does not exist in Fedora rawhide with mutter 3.27.x.
Created attachment 364669 [details] [review] monitor-manager-kms: poll() on KMS fd on EAGAIN When drmHandleEvent() returns an error and errno is set to EAGAIN, instead of ending up in a busy loop, poll() the fd until there is anything to read. This is a simple backport of commit 406359bba1.
Review of attachment 364669 [details] [review]: lgtm
The following fix has been pushed: 6dd28bd monitor-manager-kms: poll() on KMS fd on EAGAIN
Created attachment 365352 [details] [review] monitor-manager-kms: poll() on KMS fd on EAGAIN When drmHandleEvent() returns an error and errno is set to EAGAIN, instead of ending up in a busy loop, poll() the fd until there is anything to read. This is a simple backport of commit 406359bba1.
This does not even build: backends/native/meta-monitor-manager-kms.c: In function ‘meta_monitor_manager_kms_wait_for_flip’: backends/native/meta-monitor-manager-kms.c:1796:36: error: ‘error’ undeclared (first use in this function); did you mean ‘perror’? g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, ^~~~~ perror And it's already in the stable branch.
Created attachment 365558 [details] [review] monitor-manager-kms: Fix recently introduced build issue The recent commit 6dd28bd2c7e0c "poll() on KMS fd on EAGAIN" backported error handling code that does not apply to the gnome-3-26 branch.
Sorry, seems like I did not even compile test it in the end; not sure how that happened :-/
Review of attachment 365558 [details] [review]: LGTM
Pushed to stable branch. The following fix has been pushed: ae46004 monitor-manager-kms: Fix recently introduced build issue
Created attachment 365581 [details] [review] monitor-manager-kms: Fix recently introduced build issue The recent commit 6dd28bd2c7e0c "poll() on KMS fd on EAGAIN" backported error handling code that does not apply to the gnome-3-26 branch.