[Intel-gfx] [PATCH 07/10] drm/i915: Reduce spinlock hold time during notify_ring() interrupt
Chris Wilson
chris at chris-wilson.co.uk
Thu Jan 18 18:08:46 UTC 2018
Quoting Tvrtko Ursulin (2018-01-17 10:45:16)
>
> On 15/01/2018 21:24, Chris Wilson wrote:
> > By taking advantage of the RCU protection of the task struct, we can find
> > the appropriate signaler under the spinlock and then release the spinlock
> > before waking the task and signaling the fence.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> > drivers/gpu/drm/i915/i915_irq.c | 29 +++++++++++++++++++----------
> > 1 file changed, 19 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index 3517c6548e2c..0b272501b738 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1065,21 +1065,24 @@ static void ironlake_rps_change_irq_handler(struct drm_i915_private *dev_priv)
> >
> > static void notify_ring(struct intel_engine_cs *engine)
> > {
> > + const u32 seqno = intel_engine_get_seqno(engine);
> > struct drm_i915_gem_request *rq = NULL;
> > + struct task_struct *tsk = NULL;
> > struct intel_wait *wait;
> >
> > - if (!engine->breadcrumbs.irq_armed)
> > + if (unlikely(!engine->breadcrumbs.irq_armed))
> > return;
>
> It isn't unlikely in GuC mode, just sayin'...
Already taken care of, guc now "pins" the irq as opposed to arming it. So
we should be able to equate irq_armed to mean "has waiters".
-Chris
More information about the Intel-gfx
mailing list