[Intel-gfx] [PATCH] drm/i915/shrinker: Wrap need_resched() inside preempt-disable

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 4 12:15:34 UTC 2017


Quoting Joonas Lahtinen (2017-08-04 12:52:51)
> On pe, 2017-08-04 at 11:41 +0100, Chris Wilson wrote:
> > In order for us to successfully detect the end of a timeslice,
> > preemption must be disabled. Otherwise, inside the loop we may be
> > preempted many times without our noticing, and each time our timeslice
> > will be reset, invalidating need_resched()
> > 
> > Reported-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > Reported-by: Tomi Sarvela <tomi.p.sarvela at intel.com>
> > Fixes: 290271de34f6 ("drm/i915: Spin for struct_mutex inside shrinker")
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > Cc: <drm-intel-fixes at lists.freedesktop.org> # v4.13-rc1+
> 
> Gets rid of the hang for my BDW.
> 
> Tested-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Thanks for the overnight testing, pushed.
-Chris


More information about the Intel-gfx mailing list