[Intel-gfx] [PATCH 3/5] drm/i915: Convert OpRegion ASLE irq worker into a tasklet

Chris Wilson chris at chris-wilson.co.uk
Mon May 23 09:22:30 UTC 2016


On Mon, May 23, 2016 at 12:12:30PM +0300, Jani Nikula wrote:
> >  #define ACPI_EV_DISPLAY_SWITCH (1<<0)
> > @@ -814,11 +807,11 @@ void intel_opregion_fini(struct drm_device *dev)
> >  	if (!opregion->header)
> >  		return;
> >  
> > +	tasklet_kill(&dev_priv->opregion.asle_task);
> > +
> 
> So what if you got a new asle interrupt right here?

Before we call fini, we should have de-installed the irq and done
synchronize_irq, so we only have to worry about the residual task.
(At least that is what I expect!)

> >  	if (opregion->asle)
> >  		opregion->asle->ardy = ASLE_ARDY_NOT_READY;
> 
> This is supposed to signal we're not ready to handle said interrupts
> anymore. Not that we should rely on it either.
> 
> It wasn't pretty before, but I think this patch widens the window for a
> race. If you kept the *other* code as it were, and just changed the work
> to tasklets, I'd be willing to look in the other direction...

Considering the recent discussion about the negatives of
tasklets/ksoftirqd, I think I was being too cavalier in this conversion,
and we should only think about using tasklet where the post-interrupt
latency is critical.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list