All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Park the signaler before sleeping
@ 2017-04-03 10:51 Chris Wilson
  2017-04-03 11:07 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-04-04  9:57 ` [PATCH] " Tvrtko Ursulin
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2017-04-03 10:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala

If the signal to park arrives before we sleep, then we need to check
kthread_should_park() before sleeping to avoid missing the signal.
Otherwise, if the signal arrives whilst we are processing completed
requests, we will reset the current->state back to TASK_INTERRUPTIBLE
and so miss the wakeup.

Fixes: fe3288b5da2c ("drm/i915: Park the breadcrumbs signaler across a GPU reset")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/intel_breadcrumbs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index b6ea192ad550..308c56a021ab 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -629,6 +629,9 @@ static int intel_breadcrumbs_signaler(void *arg)
 		} else {
 			DEFINE_WAIT(exec);
 
+			if (kthread_should_park())
+				kthread_parkme();
+
 			if (kthread_should_stop()) {
 				GEM_BUG_ON(request);
 				break;
@@ -641,9 +644,6 @@ static int intel_breadcrumbs_signaler(void *arg)
 
 			if (request)
 				remove_wait_queue(&request->execute, &exec);
-
-			if (kthread_should_park())
-				kthread_parkme();
 		}
 		i915_gem_request_put(request);
 	} while (1);
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Park the signaler before sleeping
  2017-04-03 10:51 [PATCH] drm/i915: Park the signaler before sleeping Chris Wilson
@ 2017-04-03 11:07 ` Patchwork
  2017-04-04  9:57 ` [PATCH] " Tvrtko Ursulin
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-04-03 11:07 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Park the signaler before sleeping
URL   : https://patchwork.freedesktop.org/series/22357/
State : success

== Summary ==

Series 22357v1 drm/i915: Park the signaler before sleeping
https://patchwork.freedesktop.org/api/1.0/series/22357/revisions/1/mbox/

Test gem_exec_suspend:
        Subgroup basic-s4-devices:
                pass       -> DMESG-WARN (fi-kbl-7560u) fdo#100125

fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 430s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time: 428s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 571s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 505s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 552s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 488s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 476s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 408s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 412s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 414s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 490s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 464s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 455s
fi-kbl-7560u     total:278  pass:267  dwarn:1   dfail:0   fail:0   skip:10  time: 571s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 456s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time: 571s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 460s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 489s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time: 433s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 529s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 407s

61a93a2f9a2d9a611d673ecd0dfa693f0c888003 drm-tip: 2017y-04m-03d-09h-50m-53s UTC integration manifest
7064b74 drm/i915: Park the signaler before sleeping

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4382/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Park the signaler before sleeping
  2017-04-03 10:51 [PATCH] drm/i915: Park the signaler before sleeping Chris Wilson
  2017-04-03 11:07 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-04-04  9:57 ` Tvrtko Ursulin
  2017-04-04 12:28   ` Chris Wilson
  1 sibling, 1 reply; 4+ messages in thread
From: Tvrtko Ursulin @ 2017-04-04  9:57 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: Mika Kuoppala


On 03/04/2017 11:51, Chris Wilson wrote:
> If the signal to park arrives before we sleep, then we need to check
> kthread_should_park() before sleeping to avoid missing the signal.
> Otherwise, if the signal arrives whilst we are processing completed
> requests, we will reset the current->state back to TASK_INTERRUPTIBLE
> and so miss the wakeup.
>
> Fixes: fe3288b5da2c ("drm/i915: Park the breadcrumbs signaler across a GPU reset")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_breadcrumbs.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index b6ea192ad550..308c56a021ab 100644
> --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> @@ -629,6 +629,9 @@ static int intel_breadcrumbs_signaler(void *arg)
>  		} else {
>  			DEFINE_WAIT(exec);
>
> +			if (kthread_should_park())
> +				kthread_parkme();
> +
>  			if (kthread_should_stop()) {
>  				GEM_BUG_ON(request);
>  				break;
> @@ -641,9 +644,6 @@ static int intel_breadcrumbs_signaler(void *arg)
>
>  			if (request)
>  				remove_wait_queue(&request->execute, &exec);
> -
> -			if (kthread_should_park())
> -				kthread_parkme();
>  		}
>  		i915_gem_request_put(request);
>  	} while (1);
>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Park the signaler before sleeping
  2017-04-04  9:57 ` [PATCH] " Tvrtko Ursulin
@ 2017-04-04 12:28   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-04-04 12:28 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx, Mika Kuoppala

On Tue, Apr 04, 2017 at 10:57:15AM +0100, Tvrtko Ursulin wrote:
> 
> On 03/04/2017 11:51, Chris Wilson wrote:
> >If the signal to park arrives before we sleep, then we need to check
> >kthread_should_park() before sleeping to avoid missing the signal.
> >Otherwise, if the signal arrives whilst we are processing completed
> >requests, we will reset the current->state back to TASK_INTERRUPTIBLE
> >and so miss the wakeup.
> >
> >Fixes: fe3288b5da2c ("drm/i915: Park the breadcrumbs signaler across a GPU reset")
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> >Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> >---
> > drivers/gpu/drm/i915/intel_breadcrumbs.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> >index b6ea192ad550..308c56a021ab 100644
> >--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> >+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> >@@ -629,6 +629,9 @@ static int intel_breadcrumbs_signaler(void *arg)
> > 		} else {
> > 			DEFINE_WAIT(exec);
> >
> >+			if (kthread_should_park())
> >+				kthread_parkme();
> >+
> > 			if (kthread_should_stop()) {
> > 				GEM_BUG_ON(request);
> > 				break;
> >@@ -641,9 +644,6 @@ static int intel_breadcrumbs_signaler(void *arg)
> >
> > 			if (request)
> > 				remove_wait_queue(&request->execute, &exec);
> >-
> >-			if (kthread_should_park())
> >-				kthread_parkme();
> > 		}
> > 		i915_gem_request_put(request);
> > 	} while (1);
> >
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Thanks, I have it my queue -- I'll push with the other signaler patch,
hint hint ;)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-04 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 10:51 [PATCH] drm/i915: Park the signaler before sleeping Chris Wilson
2017-04-03 11:07 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-04-04  9:57 ` [PATCH] " Tvrtko Ursulin
2017-04-04 12:28   ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.