diff mbox

BUG: kworker hangs the GPU on drm and i915 since 3.8.x under X11

Message ID 1365199260.94686.YahooMailNeo@web121006.mail.ne1.yahoo.com (mailing list archive)
State New, archived
Headers show

Commit Message

George Amanakis April 5, 2013, 10:01 p.m. UTC
I mean that I can type, move the mouse pointer, open new windows but there is a lag until these changes are displayed. Stuttering like.

I ended up not reverting the aforementioned commit but modifying it. This also solves the issue. Here is the patch:

Comments

Daniel Vetter April 6, 2013, 3:11 p.m. UTC | #1
On Sat, Apr 6, 2013 at 12:01 AM, George Amanakis <g_amanakis@yahoo.com> wrote:
> I mean that I can type, move the mouse pointer, open new windows but there
> is a lag until these changes are displayed. Stuttering like.
>
> I ended up not reverting the aforementioned commit but modifying it. This
> also solves the issue. Here is the patch:

Indeed, the commit you've bisected too accidentally removed this
check. I'll submit a patch.So I guess you've explicitly set
drm_kms_helper.poll=0. Can you please elaborate what you're working
around with this option? Any such case is a bug.

Also, can you please test latest 3.9-rc kernels (without your patch,
i.e. a broken configuration)? It contains some rework to make hpd
detection less intrusive for normal desktop activity and should also
greatly help for your case here.

Thanks, Daniel


>
> diff -rupN a/drivers/gpu/drm/drm_crtc_helper.c
> b/drivers/gpu/drm/drm_crtc_helper.c
> --- a/drivers/gpu/drm/drm_crtc_helper.c    2013-02-19 00:58:34.000000000
> +0100
> +++ b/drivers/gpu/drm/drm_crtc_helper.c    2013-04-05 23:10:36.454936677
> +0200
> @@ -1067,7 +1067,7 @@ void drm_helper_hpd_irq_event(struct drm
>      enum drm_connector_status old_status;
>      bool changed = false;
>
> -    if (!dev->mode_config.poll_enabled)
> +    if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll)
>          return;
>
>      mutex_lock(&dev->mode_config.mutex);
>



--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
George Amanakis April 6, 2013, 4:24 p.m. UTC | #2
Indeed, I set explicitly drm_kms_helper.poll=0 since 2.35.x. See here:
http://souriguha.wordpress.com/2011/03/08/how-to-solve-problem-with-thinkpadkslowd-kworker-on-linux-kernel-2-35-2-36/

Mouse and keyboard freezes intermittently some time after boot up. Actually the problem has to do with the GPU lagging and displaying the changes later. This results in an almost unusable desktop environment. Top 
will report the high CPU usage by 3-4 processes named kworker. With the drm_kms_helper.poll=0 it was until the 3.8.x kernel resolved.

Since the 3.8.x kernels the exact same problem appeared again. The problem persists with the latest 3.9-rc5 too. 
 
Thanks, George
Daniel Vetter April 6, 2013, 4:27 p.m. UTC | #3
On Sat, Apr 6, 2013 at 6:24 PM, George Amanakis <g_amanakis@yahoo.com> wrote:
> Indeed, I set explicitly drm_kms_helper.poll=0 since 2.35.x. See here:
> http://souriguha.wordpress.com/2011/03/08/how-to-solve-problem-with-thinkpadkslowd-kworker-on-linux-kernel-2-35-2-36/
>
> Mouse and keyboard freezes intermittently some time after boot up. Actually
> the problem has to do with the GPU lagging and displaying the changes later.
> This results in an almost unusable desktop environment. Top will report the
> high CPU usage by 3-4 processes named kworker. With the
> drm_kms_helper.poll=0 it was until the 3.8.x kernel resolved.
>
> Since the 3.8.x kernels the exact same problem appeared again. The problem
> persists with the latest 3.9-rc5 too.

Ah, so it seems to be a plain hpd irq storm (since you have massive
cpu loads), not edid readings taking forever (which would still cause
the mouse to lag horribly on 3.8 and earlier, but without cpu load).
The edid reading issues should be fixed in 3.9. For hpd irq storms
Egbert Eich from Suse is working on some patches to mitigate this.
Infrastructure prep work is already merged for 3.10, hopefully we can
merge the actual mitigation logic, too.

I'll try no to forget to ping you once it's merged, so that you can
test it a bit.

Cheers, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
diff mbox

Patch

diff -rupN a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
--- a/drivers/gpu/drm/drm_crtc_helper.c    2013-02-19 00:58:34.000000000 +0100
+++ b/drivers/gpu/drm/drm_crtc_helper.c    2013-04-05 23:10:36.454936677 +0200
@@ -1067,7 +1067,7 @@  void drm_helper_hpd_irq_event(struct drm
     enum drm_connector_status old_status;
     bool changed = false;
 
-    if (!dev->mode_config.poll_enabled)
+    if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll)
         return;
 
     mutex_lock(&dev->mode_config.mutex);