[Intel-gfx] [PATCH] drm/i915: Don't need a timer to wake us up

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 27 01:47:45 PST 2015


On Fri, Nov 27, 2015 at 09:35:16AM +0000, Tvrtko Ursulin wrote:
> 
> On 26/11/15 18:24, Chris Wilson wrote:
> >On Thu, Nov 26, 2015 at 05:55:39PM +0000, Chris Wilson wrote:
> >>On Thu, Nov 26, 2015 at 05:15:46PM +0000, Tvrtko Ursulin wrote:
> >>>From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> >>>
> >>>Looks like the sleeping loop in __i915_wait_request can be
> >>>simplified by using io_schedule_timeout instead of setting
> >>>up and destroying a timer.
> >>
> >>Simplified by duplicating code? I liked the explicit handling for its
> >>obviousness and simplicity.
> >To be slightl more gracious, after we eliminate the irq handling from
> >this function, the waiter does look like this, albeit I still think it
> >is cleaner to keep the timeout handling distinct from the indefinite
> >waits.
> 
> Duplicating code, fake_irq obviousness and simplicity?!?

Bah, the code was duplicated in Feb 2015. fake_irq is obvious and a
precise description of what we are doing and why, that's why I like it.
It is much easier to convert to other wakeups (say hrtimer, or napi
style). This code needs to be changed to solve the thundering herd
problem, if you want to improve this code, keep reviewing the
prequisites.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list