Re: [PATCH] drm/i915: Park the signaler before sleeping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
> >Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> >Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> >---
> > 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@xxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux